如何做一个始终处于最底层的窗口像桌面效果一样(比如美萍卫士)(100分)

  • 主题发起人 主题发起人 jm
  • 开始时间 开始时间
J

jm

Unregistered / Unconfirmed
GUEST, unregistred user!
如何做一个始终处于最底层的窗口像桌面效果一样,任何其他窗口都显示于其上。
 
在system.ini中,将shell=Explorer.exe项改为你自己的程序名称。<br>如shell=project1.exe,就可以了。
 
美萍的方法好象不是这样的,因为美萍运行前,你可以看到桌面,<br>我认为美萍做的只是一个模拟桌面的东西,其实当前的桌面就是应用程序的窗体<br>,不知道我的想法正确与否!
 
我也想知道,头注!
 
自己接管桌面<br><br>深度历险中有技术介绍
 
美萍的那个东西就是自己的窗口,遮在桌面上,封住了Ctrl+Alt+Del之类的按键,模仿<br>explorer而已,很容易破的,不知有多少种办法
 
乱说!浮说!!!<br>美萍的桌面是最下层的吗???开个窗口,再点它的桌面看看,你的窗口呢???<br>他用了把铁钩钩了任务栏!!!(这招高)<br>怎么能谁谁边边的隐藏任务蓝,或则吧 explorer.exe 关掉。<br>增摸话??当真用 Photoshop 7.0+ 画?<br>QQ 增么半???
 
看看深度历险。
 
Use WinAPI CreateDesktopWindow() to Create a desktopwindow by your self!
 
其实美萍只用了一些非常简单的ABC一级的API技术而已。<br>1.关闭和显示任务栏;<br>2.做一个带开始按钮的任务栏。Abf中有现成的控件。<br>3.桌面么?桌面就是一个没有标题的、最大化的窗口。我自己有个这样的控件。<br>4.桌面上的图标?难道不是Icon方式显示的ListView吗?
 
自己接管桌面<br>
 
《Delphi深度历险》中有介绍
 
下面的E文可能对提问者有帮助。<br><br>    Stay On Down forms... <br>Undertitle:   <br>  <br>Category: Win API <br>Uploader: Radikal Q3 <br>&nbsp; <br>Question: Stay On Down forms... <br>Answer: You will surely know the way to make a form ' StayOnTop', that is to say, a form that always remains above the rest. &nbsp;<br>This tip consists in just the opposite: to make that the form always remains under the rest, over the desk.<br><br>A way to get this is executing the following code:<br><br><br>&nbsp; &nbsp; SetWindowPos( Form1.Handle,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HWND_BOTTOM,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,0,0,0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SWP_NOMOVE or SWP_NOSIZE);<br><br><br>But... if we want that it is always under? that events must use to get it? &nbsp;<br>I have looked for them, but I was not able to make that works cleanly and without flickering so at the end I desisted of using this code. &nbsp;<br>I solved the workc by means of the message WM_WindowPosChanging that Windows sends to the form before producing a position change, size or visual order (Z Order) in the form.<br><br>The example:<br><br>First we capture the message, for that which, we will add one line in the private part of your form:<br><br><br>type<br>&nbsp; TForm1 = class(TForm)<br>&nbsp; &nbsp; Button1: TButton;<br>&nbsp; &nbsp; procedure Button1Click(Sender: TObject);<br>&nbsp; &nbsp; procedure FormActivate(Sender: TObject);<br>&nbsp; private<br>&nbsp; &nbsp; { Private declarations }<br>&nbsp; &nbsp; {Esta linea:/This Line:}<br>&nbsp; &nbsp; procedure Chivato(var m: TWMWINDOWPOSCHANGED);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message WM_WindowPosChanging;<br>&nbsp; public<br>&nbsp; &nbsp; { Public declarations }<br>&nbsp; end;<br><br><br>Now, we have to put the implementation of the procedure ' Chivato' that will treat the message meetly. We will put it, of course, in the implementation of the form:<br><br><br>procedure TForm1.Chivato(var m: TWMWINDOWPOSCHANGED);<br>begin<br>&nbsp; m.WindowPos.hwndInsertAfter:=HWND_BOTTOM;<br>end;<br><br><br>The operation is very simple: &nbsp;<br>One of the parameters of the message is WindowPos that is a structure in which Windows informs us of the new parameters of the window (size and position). &nbsp;<br>If we don't change the structure, the change will take place. However, if we change some of the parameters, the window will take the aspect and position that we indicate him in the change. &nbsp; &nbsp;<br>&nbsp;<br>
 
DELPHI6带了一个控件把它放到窗体上时,它的内容就是桌面上的图标。<br>通过它完全实现美萍的功能。
 
同意barton,简单,可行。[:)]
 
如何做一个始终处于最底层的窗口:<br>&nbsp;procedure SetPos(var msg: TWMWINDOWPOSCHANGED); message WM_WindowPosChanging;<br><br>procedure TForm1.SetPos(var msg: TWMWINDOWPOSCHANGED);<br>begin<br>&nbsp; msg.WindowPos.hwndInsertAfter:=1;<br>end;<br><br><br>&nbsp; <br>
 
美萍软件关键在于开始按钮的消息拦截,桌面很简单,你只要在快捷栏按一下显示桌面按钮<br>它就原形必露了,它是通过自己的桌面代替原来的桌面,桌面的大小设置为“工作区域”就<br>可以了,加桌面快捷方式就是在桌面加图标而已!我现在已经做出了个大概,只是开始按钮<br>拦截的dll还在做!我们可以接着联系,互相讨论一下!!
 
同意晶晶<br>那个开始按钮其实也没有这么复杂 &nbsp;<br>把开始按钮隐藏掉 然后用自己动态生成的按钮盖在开始按钮的位置上 父设置为任务栏就可以了<br>在美萍退出的时候恢复原来的设置<br><br>不信 在你退出美萍的时候 看一下 开始按钮的后面 还有一个按钮
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
后退
顶部