Thanks, I will take a look.

Jeremy Coulter

-----Original Message-----
From: "Paul Grimstrup" <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Wed, 24 Oct 2001 11:16:54 +1300
Subject: RE: [DUG]:  Form Maximizing

> > Just a weired problem I cant figure out.
> > I havea form. I am saving its window state to teh registry when it
> > closes, so that when it reopens the form will me maximized if that
> was
> > its last state.
> > This is fin, BUT when the form opens it IS maximized, BUT its like
> 2-3
> > millimeters from the top of the screen.
> >
> 
> Sounds like your saving the Size/Position Properties when the form is
> actually maximized. Instead, you could use the GetWindowPlacement() API
> call
> to get the non-maximized size/position (this is what we use). When
> restoring
> from the registry (in the FormShow), set the size/position first,
> followed
> by WindowState if maximized.
> 
> If you want to avoid using the Win API, then in the FormClose (or
> FormDestroy) event first save the WindowState, then set WindowState to
> wsNormal, then save the Size/Position.
> 
> Cheers
> Paul Grimstrup
> 
> -----------------------------------------------------------------------
> ----
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to