Board index » delphi » Full Screen: really full screen

Full Screen: really full screen

Hi:

Is it possible to display a Form so that it REALLY occupies the entire
screen, No
Delphi (5) border at the top, and no Win9x bars, borders, or anything
else?
How do I achieve that?
Thanks
Enrico

 

Re:Full Screen: really full screen


On Tue, 20 Jun 2000 16:08:54 -0700, "Enrico P."

Quote
<eperg...@sympatico.ca> wrote:
> No Delphi (5) border at the top,

Not sure what you mean by "Delphi (5) border", perhaps you mean the
title bar which is at the top of nearly every window in Microsoft
Windows?

To get a full screen, set your form's BorderStyle property to bsNone,
and WindowState to wsMaximized.
--
Rick Rogers (TeamB)
www.fenestra.com and www.componentfactory.com

Re:Full Screen: really full screen


Rick

yes i meant the title bar.
Thank yiou!

Quote
"Rick Rogers (TeamB)" wrote:
> On Tue, 20 Jun 2000 16:08:54 -0700, "Enrico P."
> <eperg...@sympatico.ca> wrote:

> > No Delphi (5) border at the top,

> Not sure what you mean by "Delphi (5) border", perhaps you mean the
> title bar which is at the top of nearly every window in Microsoft
> Windows?

> To get a full screen, set your form's BorderStyle property to bsNone,
> and WindowState to wsMaximized.
> --
> Rick Rogers (TeamB)
> www.fenestra.com and www.componentfactory.com

Re:Full Screen: really full screen


Quote
In article <394FF986.9F497...@sympatico.ca>, Enrico P. wrote:
> Is it possible to display a Form so that it REALLY occupies the entire
> screen, No
> Delphi (5) border at the top, and no Win9x bars, borders, or anything
> else?
> How do I achieve that?

Emulating full screen mode:

  private  // in form declaration
    Procedure WMGetMinMaxInfo(Var msg: TWMGetMinMaxInfo);
      message WM_GETMINMAXINFO;

Procedure TForm1.WMGetMinMaxInfo(Var msg: TWMGetMinMaxInfo);
  Begin
    inherited;
    With msg.MinMaxInfo^.ptMaxTrackSize Do Begin
      X := GetDeviceCaps( Canvas.handle, HORZRES ) + (Width - ClientWidth);
      Y := GetDeviceCaps( Canvas.handle, VERTRES ) + (Height - ClientHeight
);
    End;
  End;

procedure TForm1.Button2Click(Sender: TObject);
Const
  Rect: TRect = (Left:0; Top:0; Right:0; Bottom:0);
  FullScreen: Boolean = False;
begin
  FullScreen := not FullScreen;  
  If FullScreen Then Begin
    Rect := BoundsRect;
    SetBounds(
      Left - ClientOrigin.X,
      Top - ClientOrigin.Y,
      GetDeviceCaps( Canvas.handle, HORZRES ) + (Width - ClientWidth),
      GetDeviceCaps( Canvas.handle, VERTRES ) + (Height - ClientHeight ));
  //  Label2.caption := IntToStr(GetDeviceCaps( Canvas.handle, VERTRES ));
  End
  Else
    BoundsRect := Rect;
end;

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads