Make a form bigger than screen  

Send By: Radikal (Q3 Team)
Web : http://www.q3.nu
Email: radikal@q3.nu
Date: 28/08/20

Tip accessed 535 times

 


That why serves?, for example... if you have a VGA of which it allows to show your dektop between two monitors...

 type
    TForm1 = class(TForm)
    ...
     procedure WMWindowPosChanging(var AMessage: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING;
     procedure WMGetMinMaxInfo(var AMessage : TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
     procedure Button1Click(Sender: TObject);
    ...
   end;


 procedure TForm1.WMGetMinMaxInfo(var AMessage: TWMGetMinMaxInfo);
 var
   _sz: TPoint;
 begin
  _sz := Point(3000, 2000);
  with AMessage.MinMaxInfo^ do begin
   ptMaxSize := TPoint(_sz);
   ptMaxTrackSize := TPoint(_sz)
  end
 end;

 procedure TForm1.WMWindowPosChanging(var AMessage: TWMWindowPosChanging);
 begin
  // not inherited
 end;

 procedure TForm1.Button1Click(Sender: TObject);
 begin
  SetBounds(0, 0, 3000, 2000);
 end;