Avoid form minimization  

Send By: Radikal (Q3 Team)
Web : http://www.q3.nu
Email: radikal@q3.nu
Date: 22/01/00

Tip accessed 526 times

 


First, look the tip:

[102] - Execute code before application will be minimized

to know how works this other tip.

And now, here you have a modification of the said tip for avoid that the for will be minimized:


 unit Unit1;

 interface

 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

 type
   TForm1 = class(TForm)
   private
     { Private declarations }
     procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
   public
     { Public declarations }
   end;

 var
   Form1: TForm1;

 implementation

 {$R *.DFM}

 procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);
 begin
   if (Msg.CmdType = SC_MINIMIZE)
   then Msg.Result:=0
   else DefaultHandler(Msg);
 end;

 end.