怎么使桌面文字透明? (200分)

H

hlsoft

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么使桌面文字透明?即使按F5刷新桌面也要保持透明。<br>用timer来监控桌面是否透明的方法太浪费资源了,应该用DLL比较好吧,哪位高手能告诉我怎么做出这个DLL,并告诉我怎么在程序中调用?谢谢!<br><br>以前有人贴了一段下面的代码,可我不知道那个 TimerCallBack怎么用。<br>function GetDesktopListViewHandle: HWND;<br>var<br>&nbsp; &nbsp;S: string;<br>begin<br>&nbsp; &nbsp;Result := FindWindow('ProgMan', nil);<br>&nbsp; &nbsp;Result := GetWindow(Result, GW_CHILD);<br>&nbsp; &nbsp;Result := GetWindow(Result, GW_CHILD);<br>&nbsp; &nbsp;SetLength(S, 30);<br>&nbsp; &nbsp;GetClassName(Result, PChar(S), 39);<br>&nbsp; &nbsp;if PChar(S) &lt;&gt; 'SysListView32' then Result := 0;<br>end;<br><br>function TransParentDesktopIconText: integer;<br>var<br>&nbsp; &nbsp;itemCount: integer;<br>&nbsp; &nbsp;DesktopListViewHandle: HWND;<br>begin<br>&nbsp; &nbsp;DesktopListViewHandle := GetDesktopListViewHandle;<br>&nbsp; &nbsp;SendMessage(DesktopListViewHandle, LVM_SETTEXTBKCOLOR, 0, CLR_NONE);<br>&nbsp; &nbsp;itemCount := SendMessage(DesktopListViewHandle, LVM_GETITEMCOUNT, 0,<br>&nbsp; &nbsp; &nbsp; 0);<br>&nbsp; &nbsp;Result := SendMessage(DesktopListViewHandle, LVM_REDRAWITEMS, 0,<br>&nbsp; &nbsp; &nbsp; ItemCount - 1)<br>end;<br><br>procedure TimerCallBack(Wnd: HWND; Msg, idEvent: UINT; dwTime: DWORD);<br>&nbsp; &nbsp;stdcall; far; export;<br>begin<br>&nbsp; &nbsp;if SendMessage(GetDesktopListViewHandle, LVM_GETTEXTBKCOLOR, 0, 0) &lt;&gt; -1 then<br>&nbsp; &nbsp; &nbsp; TransParentDesktopIconText<br>end;
 
利用WINDOWS消息处理
 
我想知道详细的方法。
 
察看 help 文件<br>
 
这样可以吗? 试试看! <br>var wnd:HWND;<br>begin<br>&nbsp; &nbsp;Wnd := GetDesktopWindow;<br>&nbsp; &nbsp;Wnd := FindWindowEx(Wnd, 0, 'Progman', nil);<br>&nbsp; &nbsp;Wnd := FindWindowEx(Wnd, 0, 'SHELLDLL_DefView', nil);<br>&nbsp; &nbsp;Wnd := FindWindowEx(Wnd, 0, 'SysListView32', nil);<br>&nbsp; &nbsp;SendMessage(Wnd, $1026, 0, $ffffffff); //this<br>&nbsp; &nbsp;SendMessage(Wnd, $1024, 0, $00ffffff); <br>&nbsp; &nbsp;InvalidateRect(Wnd, nil, TRUE); &nbsp; &nbsp; &nbsp; &nbsp; <br>end;<br>
 
要能总是保持透明,即使按F5刷新桌面也要保持透明
 
那样好像是不可能实现的,因为这是Windows的内核上面的问题,你用程序只是暂时“强制”改变<br>了一下它原来的“面容”。所以执行了刷新后它会调用原来的代码处理桌面图标,除非你修改Win<br>内核,但是那样做的可能性不大。
 
捕获F5事件是否可以阿
 
可以实现捕获F5事件,好像Windows里面有很多的事件都可以捕获,不过要捕获它可那么简单,如果你得到<br>了解决的方法,请顺便告诉我一声,好吗?
 
我只是想让各位告诉我怎么使用我贴的那个timercallback,
 
timercallback函数就是Timer控件的回调函数啊<br>或者可以直接用api函数:SetTimer将timercallback指定为回调函数
 
SetTimer(handle,0,8,@TimerCallBack);
 
有没有办法F5刷新后依然透明,同时又不在内存驻留任何程序。
 
我使用过这个代码<br>确实是这个样子,你只能驻留程序,随时调用这个代码了
 
WINDOWS优化大师有这一选项,可能是修改了注册表。<br>到有关注册表网站搜一下。
 
TO savetime:那样好像是没有用的。据我所知像那些软件当中的这样的功能者是通过代码来实现<br>的,别的好像没有办法,就连Windows Binds也无法保证软件被关闭后Windows的桌面仍然可以是<br>图标背景透明。<br>好像就是这个样子哟,不过WinXP就不同,它可以让图标文字带上阴影等……
 
&nbsp; &nbsp; 利用Windows优化大师确实可以做到这一点,当时我用RegMonitor和RegDog跟踪时发现<br>它修改好像是ShellIcon子键下的一些键值,不过当时没太注意。<br>&nbsp; &nbsp; &nbsp;RegMonitor的下载地址:www.internals.com,不行的话进入任意的软件屋应当能找到,<br>不过这个网址最近好像有添加了什么ApiSpy等东东,不曾用过。推荐使用RegDog,不过好久没<br>用了,搜索一下就能找到。祝好运!<br>&nbsp; &nbsp; &nbsp;
 
顶部