type
TForm1 = class(TForm)
......
public
{ Public declarations }
procedure WMSysCommand(var Message: TWMSysCommand);message WM_SYSCOMMAND;
end;
procedure TForm1.WMSysCommand(var Message: TWMSysCommand);
begin
if (Message.CmdType and $FFF0 = SC_MINIMIZE){ or
(Message.CmdType and $FFF0 = SC_CLOSE) or
(Message.CmdType and $FFF0 = SC_MAXIMIZE)} then
Form1.Visible:=False // 隐藏窗体
else
Inherited;
end;
阅读(3416) | 评论(0) | 转发(0) |