home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,600 of 10,840   
   J French to All   
   Re: Double Clicking on Title Bar   
   01 Jul 05 07:06:32   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca