请问:如何让程序窗口在桌面图标的下面? ( 积分: 50 )

  • 主题发起人 主题发起人 大傻子
  • 开始时间 开始时间

大傻子

Unregistered / Unconfirmed
GUEST, unregistred user!
也就是实现这个功能:就象一些播放软件一样能把桌面当成播放窗口。
 
取得桌面句柄,直接向桌面画
 
给个代码行吗?
 
以解决,不过有问题,谁能带一下,看看如何恢复。<br><br>unit&nbsp;Unit1;<br><br>interface<br><br>uses<br>&nbsp;&nbsp;Windows,&nbsp;Messages,&nbsp;SysUtils,&nbsp;Variants,&nbsp;Classes,&nbsp;Graphics,&nbsp;Controls,&nbsp;Forms,<br>&nbsp;&nbsp;Dialogs,&nbsp;jpeg,&nbsp;ExtCtrls,&nbsp;StdCtrls;<br><br>type<br>&nbsp;&nbsp;TForm1&nbsp;=&nbsp;class(TForm)<br>&nbsp;&nbsp;&nbsp;&nbsp;img1:&nbsp;TImage;<br>&nbsp;&nbsp;&nbsp;&nbsp;btn1:&nbsp;TButton;<br>&nbsp;&nbsp;&nbsp;&nbsp;btn2:&nbsp;TButton;<br>&nbsp;&nbsp;&nbsp;&nbsp;procedure&nbsp;FormCreate(Sender:&nbsp;TObject);<br>&nbsp;&nbsp;&nbsp;&nbsp;procedure&nbsp;btn1Click(Sender:&nbsp;TObject);<br>&nbsp;&nbsp;&nbsp;&nbsp;procedure&nbsp;btn2Click(Sender:&nbsp;TObject);<br>&nbsp;&nbsp;private<br>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Private&nbsp;declarations&nbsp;}<br>&nbsp;&nbsp;public<br>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;Public&nbsp;declarations&nbsp;}<br>&nbsp;&nbsp;end;<br><br>var<br>&nbsp;&nbsp;Form1:&nbsp;TForm1;<br>&nbsp;&nbsp;var&nbsp;had,had1:THandle;<br>implementation<br><br>{$R&nbsp;*.dfm}<br><br>procedure&nbsp;TForm1.FormCreate(Sender:&nbsp;TObject);<br><br>begin<br>&nbsp;&nbsp;&nbsp;had:=FindWindow('Progman',&nbsp;&nbsp;&nbsp;'Program&nbsp;Manager');<br>&nbsp;&nbsp;&nbsp;//had1:=FindWindow('Progman',&nbsp;&nbsp;&nbsp;'Program&nbsp;Manager');<br><br>end;<br><br>procedure&nbsp;TForm1.btn1Click(Sender:&nbsp;TObject);<br>begin<br>&nbsp;&nbsp;Windows.SetParent(had,Form1.Handle);<br>end;<br><br>procedure&nbsp;TForm1.btn2Click(Sender:&nbsp;TObject);<br>begin<br>Close;<br>end;<br><br>end.
 
后退
顶部