本文整理自网络,侵删。
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;
http://blog.chinaunix.net/uid-20564848-id-74477.html
相关阅读 >>
Delphi �c 如何使用datasnap获取作为标头传递的标记?
Delphi 如何在toolbar中的toolbutton上显示文字
Delphi d10.x 安卓app开发中按返回键后程序不退出程序的方法
更多相关阅读请进入《Delphi》频道 >>