Delphi – the best way to make a Delphi Application completely full screen

delphidelphi-2007

What is the best way to make a delphi application (delphi 2007 for win32 here) go completely full screen, removing the application border and covering windows task bar ?

I am looking for something similar to what IE does when you hit F11.

I wish this to be a run time option for the user not a design time decision by my good self.

As Mentioned in the accepted answer

BorderStyle := bsNone; 

was part of the way to do it. Strangely I kept getting a E2010 Incompatible types: 'TFormBorderStyle' and 'TBackGroundSymbol' error when using that line (another type had bsNone defined).

To overcome this I had to use :

BorderStyle := Forms.bsNone;

Best Answer

Well, this has always worked for me. Seems a bit simpler...

procedure TForm52.Button1Click(Sender: TObject);
begin
  BorderStyle := bsNone;
  WindowState := wsMaximized;
end;
Related Topic