1. Home
  2. Computing & Technology
  3. Delphi Programming

Make an Application window full screen

By , About.com Guide

Set the Borderstyle of your main form to bsNone and then use SystemParametersInfo message to get the SPI_GETWORKAREA value then use SetBounds to make your Window the correct size.

~~~~~~~~~~~~~~~~~~~~~~~~~
procedure TSomeForm.FormShow(Sender: TObject) ;
var
   r : TRect;
begin
   Borderstyle := bsNone;
   SystemParametersInfo
      (SPI_GETWORKAREA, 0, @r,0) ;
   SetBounds
     (r.Left, r.Top, r.Right-r.Left, r.Bottom-r.Top) ;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Use arrow keys to move between controls
« Overwrite in TMemo and TEdit.

Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2000 Delphi Tips
  7. Make an Application window full screen

©2009 About.com, a part of The New York Times Company.

All rights reserved.