怎么让一启动就放到托盘里去.托盘程序我会做了,关键是要窗体隐藏,不要在任务栏上出现,点图标的一个菜单才能将窗体显示!?(50分)

I

itfly

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么让一启动就放到托盘里去.托盘程序我会做了,关键是要窗体隐藏,<br>不要在任务栏上出现,点图标的一个菜单才能将窗体显示!?
 
隐藏任务栏:<br>在你的单元中initialization部分写上以下代码就可以了;<br>SetWindowLong(Application.Handle,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GWL_EXSTYLE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GetWindowLong(Application.Handle,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GWL_EXSTYLE)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;or WS_EX_TOOLWINDOW <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and not WS_EX_APPWINDOW); <br><br>隐藏主窗体:在工程文件代码中写入<br>Application.ShowMainForm := False;<br>调用时候show就可以了。
 
Application.ShowMainForm := False;就可以隐藏窗体
 
Application.ShowMainForm := False;就可以隐藏窗体
 
结帖,发公资
 
顶部