请问要重写WINDOW的最小化动作应该怎么写.
窗口最小化对应WINDOW的哪个消息啊?
谢谢啦!

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, Buttons, CheckLst;type
      TForm1 = class(TForm)
      private
        { Private declarations }
        procedure WMSysCommand(var Message:Tmessage);
        message WM_SYSCOMMAND;
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}
    procedure TForm1.WMSysCommand(var Message:Tmessage);
     begin
      if Message.WParam=SC_MINIMIZE then
         ...;
      else inherited;
     end;
    end.
      

  2.   

    procedure TForm1.WMSysCommand(var Message:Tmessage);
     begin
      if Message.WParam=SC_MINIMIZE then
         exit;  //不让退出了,呵呵
      else inherited;
     end;