var<br> WndLong: Integer;<br> <br>//设置程序是否出现在任务栏<br>procedure SetHidden(Hide: Boolean);<br>begin<br> ShowWindow(Application.Handle, SW_HIDE);<br> if Hide then<br> SetWindowLong(Application.Handle, GWL_EXSTYLE,<br> WndLong or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW or WS_EX_TOPMOST)<br> else<br> SetWindowLong(Application.Handle, GWL_EXSTYLE, WndLong);<br> ShowWindow(Application.Handle, SW_SHOW);<br>end;