[DUG] Problem with minimize button.
Jeremy North
jeremy.north at gmail.com
Tue Jun 26 19:38:19 NZST 2007
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 <p.scadden at gns.cri.nz> 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
More information about the Delphi
mailing list