在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;