From: erewhon@nowhere.uk   
      
   On Fri, 01 Jul 2005 05:43:27 GMT, schmendrick    
   wrote:   
      
   >Does anyone know how to disable the dbl click on the title bar?   
   >   
   >I have a full screen progam that I dont want moved or closed or   
   >anything. Took care of everything except for the fact that if you   
   >double click on the title bar, the form sets itself to half size.   
   >   
   >Can we disable that somehow??   
      
   One method is to intercept WM_SYSCOMMAND and burn off SC_RESTORE   
      
   unit Unit1;   
      
   // Keep Maximized 1/7/05 JF   
      
   interface   
      
   uses   
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,   
   Dialogs,   
    StdCtrls;   
      
   type   
    TForm1 = class(TForm)   
    procedure WMSysCommand(var Msg: TWMSysCommand); message   
   wm_SysCommand;   
    private   
    { Private declarations }   
    public   
    { Public declarations }   
    end;   
      
   var   
    Form1: TForm1;   
      
   implementation   
      
   {$R *.DFM}   
      
      
   procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);   
   begin   
    If (Msg.CmdType And SC_RESTORE) = SC_RESTORE Then   
    Begin   
    msg.Result := 0;   
    Exit;   
    End;   
    Inherited;   
   end;   
      
   end.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|