delphi截获和干扰窗体最小化�p最大化和关闭消息


本文整理自网络,侵删。

 
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 错误no ftp list parsers have been registered

Delphi屏蔽webbrowser页面中传出来的声音

Delphi 直接调用记事本(notepad)打开文本文件

Delphi 压缩图片(bmp、jpg、png)

Delphi添加任务栏右键菜单

Delphi 7zip 示例调用7z.dll 压缩及解压.7z文件

Delphi sysutils.comparestr、sysutils.comparetext - 字符串比较

Delphi 遍历类中的属性

Delphi 数组与枚举

Delphi 复制拷贝文件目录函数

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...