[DUG] Window maximised in the slightly Claytons sense

Wayne Roser rr at kristin.school.nz
Mon Aug 22 09:03:28 NZST 2005


Hmmm, sounds good so I tried it on a program that has never displayed the
"shifted down version of maximised" problem and, voila, it now has it. The
SystemParametersInfo thing actually messes up the maximised.

I've decided that I don't want wsNormal to mimic wsMaximized because I
want wsNormal to give users a deliberately designed alternative to
maximised.

Tried the Rohit solution in the dpr file:
	Application.CreateForm(TInsertFormNameHere, InsertFormNameHere);
	InsertFormNameHere.Show;
	InsertFormNameHere.WindowState := wsMaximized;
and from my sample of 1, this works perfectly.

Wayne


NZ Borland Developers Group - Delphi List <delphi at ns3.123.co.nz> on
Saturday, 20 August 2005 at 16:22 +0000 wrote:
>I always set the form size myself with the following code.
>Set windowstate to wsNormal
>procedure TView3Dfrm.FormCreate(Sender: TObject);
>var
>  r  : TRect;
>begin
>// position form above statusbar and not maximised but covering full
>screen
>  SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0);
>  left    := r.Left;
>  Top     := r.top;
>  Width   := r.right;
>  Height  := r.bottom - 1; // allow taskbar to popup
>
>>>-----Original Message-----
>>>I have an app that I want to start off maximised so I set the main form
>>>WindowState to wsMaximized at design time. (Delphi 6 pro)
>>>
>>>On my screen, winXP pro with all possible display options set to
>"windows
>>>classic", this is fine.
>>>On other machines, winXP and all possible defaults left just as they
>were
>>>installed, the top of the form sits below the top of the screen and more
>>>than half of the status bar on my main form sits behind that big chunky
>3D
>>>start bar. If I normalize and maximize, bingo, just like a bought one,
>>>just what I would've wanted at the beginning.
>



More information about the Delphi mailing list