That's because Minimize doesn't send a WM_SIZE message.

Do this:

//
protected
 procedure WMSysCommand(var Message: TWMSysCommand); message WM_SYSCOMMAND;


procedure TMyForm.WMSysCommand(var Message: TWMSysCommand);
begin
 if Message.CmdType = SC_MINIMIZE then
   // do whatever here
 inherited; // don't forget this
end;

If you put a button on form and put "Application.Minimize;" in the
OnClick event handler does it minimize the application?

cheers,
Jeremy

On 6/26/07, Phil Scadden <[EMAIL PROTECTED]> wrote:
I am having a problem that on SOME machines, my single window app
does not minimize. Pressing the minimize button on the form does nothing.

trying to figure out what was happening, I tried putting in

private
   procedure wmSize( var msg: TWMSize ); message WM_SIZE;

hook.

This is not triggered at all by the pressing the minimize button. I know that
delphi works with hidden application window, but still surprised at this.
Any idea whats going on and why a problem some machines but not
others. I cant see any correlation in OS etc. Working with D2006.


----------------------------------------------------------
Phil Scadden, GNS Science Ltd
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to