怎么让我的程序运行时不在任务栏里显示图标呀(20分)

  • 主题发起人 主题发起人 sy0116
  • 开始时间 开始时间
S

sy0116

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么让我的程序运行时不在任务栏里显示图标呀
 
&nbsp;SetWindowLong(Application.Handle, GWL_EXSTYLE,<br>&nbsp; &nbsp; GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW);<br>
 
在Create函数中加入:<br>SetWindowLong(application.Handle,GWL_EXSTYLE,ws_ex_toolwindow);<br>一切ok!!
 
加在窗体创建事件下<br><br>procedure Tform1.FormCreate(Sender: TObject);<br>&nbsp; //隐藏任务栏中的程序图标<br>&nbsp; ShowWindow( Application.Handle, SW_HIDE );<br>&nbsp; SetWindowLong( Application.Handle, GWL_EXSTYLE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GetWindowLong(Application.Handle, GWL_EXSTYLE) or<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);<br>&nbsp; ShowWindow( Application.Handle, SW_SHOW );
 
后退
顶部