首页  编辑  

程序运行不在任务出现一个按钮

Tags: /超级猛料/VCL/Form,窗体/Application Form/   Date Created:

在Main Form的OnShow中,添加如下代码即可:

 ShowWindow(Application.Handle,SW_HIDE)

此后,必须处理最小化消息:

private

 procedure WMSysCommand(var msg: TWMSysCommand); message WM_SysCommand;

{....}

implementation

procedure TMainForm.WMSysCommand(var msg: TWMSysCommand);

begin

 if msg.CmdType and $FFF0 = SC_MINIMIZE then

   hide

 else

   inherited;

end;