Cheng,

Try overriding this method (from the help) Don't forget to call inherited.

TCustomForm.Resizing
Makes any required adjustments when the form changes size.
procedure Resizing(State: TWindowState); override;
Description
This protected method is called automatically when the form is resized,
including when it is maximized, minimized, or restored to normal size.
Resizing adjusts the size and position of any child controls that are
aligned to the form.
The State parameter indicates the state of the form after the resize.

TWindowState type
TWindowState indicates whether a form is maximized, minimized, or normally
sized.
Unit
Forms
type TWindowState = (wsNormal, wsMinimized, wsMaximized);
Description
TWindowState describes the state of a form window. The following table lists
the possible values:
Value   Meaning
wsNormal        The form is in its normal state (that is, neither minimized nor
maximized).
wsMinimized     The form is minimized.
wsMaximized     The form is maximized.

Max

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Cheng Wei
Sent: Monday, 29 May 2000 15:34
To: Multiple recipients of list delphi
Subject: RE: [DUG]: How do you determine a form is manually minimised?


Thanks, but TForm doesn't have an OnMinimise event!
OnMinimise event in TApplicationEvents won't help me, what I need is the
other way around.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Rohit Gupta
Sent: Monday, 29 May 2000 15:16
To: Multiple recipients of list delphi
Subject: Re: [DUG]: How do you determine a form is manually minimised?


There is an onminimise event

-----Original Message-----
From: Cheng Wei <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Monday, 29 May 2000 12:00
Subject: [DUG]: How do you determine a form is manually minimised?


Hi all,

If a form is not the main form, when user click the Minimise BorderIcon (or
menu item), it is minimised and placed on top of the task bar. I need to
call Application.Minimize whenever this happens, so that there is always
only one taskbar icon representing the application. (there is no problem to
restore the form, simply drop a TApplicationEvents component on the form).

How do I know a form is minimised, trap windows messages? or is there  an
easier way?

Thanks
Cheng




---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to