T.R | Title | User | Personal Name | Date | Lines |
---|
24.1 | | METSYS::GOODWIN | Pete Goodwin, DEC/EDI Engineering | Thu Feb 06 1997 09:30 | 7 |
| Wouldn't you write a message handler?
procedure OnWMMinimize(var msg: TMessage); message WM_MINIMIZE;
...something like that, the exact syntax escapes me!
Pete
|
24.2 | This is all new to me | 45862::16.194.208.3::sharkeya | | Thu Feb 06 1997 09:49 | 4 |
| Yes, but how does it get called ?
Alan
|
24.3 | | METSYS::GOODWIN | Pete Goodwin, DEC/EDI Engineering | Thu Feb 06 1997 15:44 | 7 |
| Er, not sure I understand...
You put it in the form you want to override the handler for. Then, when
that form gets a WM_MINIMIZE, your handler will be called. Take a look
at the Messages section in Help. That may help confuse you further!
Pete
|
24.4 | here we go ! | 45862::SHARKEYA | LoginN - even makes the coffee@ | Thu Feb 06 1997 17:22 | 7 |
| OK - I'll have a go. I also had an answer from the Borland forum which
seems to make it a bit clearer.
I'll let you know what happens.
Alan
|
24.5 | The working solution | 45862::16.194.208.3::sharkeya | | Fri Feb 07 1997 10:48 | 25 |
| This is it.
In the declaration for the form, add this:
public
procedure WMSysCommand(var Message: TWMSysCommand);message WM_SYSCOMMAND;
{ Public declarations }
end;
Then write the method.
procedure TNotiform.WMSysCommand(var Message: TWMSysCommand);
begin
Inherited;
if(Message.CmdType and $FFF0 = SC_MINIMIZE) then begin
if HideIcon then
ShowWindow(application.handle,sw_hide);
end;
Easy when you know how.
Alan
|