delphi:点关闭按钮窗口最小化

2016-08-22 10:20:11来源:http://gzkhrh.blog.51cto.com/30447/320777作者:gzkhrh人点击


点击关闭按钮让窗体最小化unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs;type  TForm1 = class(TForm)  protected    procedure WMSysCommand(var Message: TWMSysCommand); message WM_SYSCOMMAND;  end;var  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.WMSysCommand(var Message: TWMSysCommand);begin  case Message.CmdType of    SC_CLOSE: begin         Perform(WM_SYSCOMMAND, SC_MINIMIZE, 0);         Exit;        end;  end;  inherited;end;end

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台