bor061297
asked on
Form ONMinimize Event, how?
How to get informed when main form is minimized,
(or maximized again)
(or maximized again)
bor
Inter is a hundered percent right, here is a code snippit to show a message when the form is minimized and maximized...
first add this to the type section (looks like this)
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure AppMinMessage(Sender: TObject);//here is first
procedure AppMaxMessage(Sender: TObject);//here is secound
then pass the procedures like so...
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMinimize := AppMinMessage;
Application.OnRestore := AppMaxMessage
end;
procedure TForm1.AppMinMessage(Sende r: TObject);
begin
ShowMessage('Minimize');
end;
procedure TForm1.AppMaxMessage(Sende r: TObject);
begin
ShowMessage('Maximize');
end;
Hope this helps...
Later
BoRiS
Inter is a hundered percent right, here is a code snippit to show a message when the form is minimized and maximized...
first add this to the type section (looks like this)
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure AppMinMessage(Sender: TObject);//here is first
procedure AppMaxMessage(Sender: TObject);//here is secound
then pass the procedures like so...
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMinimize := AppMinMessage;
Application.OnRestore := AppMaxMessage
end;
procedure TForm1.AppMinMessage(Sende
begin
ShowMessage('Minimize');
end;
procedure TForm1.AppMaxMessage(Sende
begin
ShowMessage('Maximize');
end;
Hope this helps...
Later
BoRiS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
michaue
Good cutting and pasting there, how about using your own code to answer this question or don't answer it at all...(Orginal, but un-called for...)
Bor
Read the comments first before grading this answer...
Later
BoRiS
Good cutting and pasting there, how about using your own code to answer this question or don't answer it at all...(Orginal, but un-called for...)
Bor
Read the comments first before grading this answer...
Later
BoRiS
Can't blame someone for trying ....
And when you have an answer DON'T use the comment option ....
And when you have an answer DON'T use the comment option ....
michaue, wake up! I think BoRiS added a comment instead of an answer because he didn't want to step on Inter's toes! (Unlike some people...)
JB
JB
michaue
Good cutting and pasting there, how about using your own code to answer this question or don't answer it at all...(Orginal, but un-called for...)
Bor
Read the comments first before grading this answer...
Later
BoRiS
Good cutting and pasting there, how about using your own code to answer this question or don't answer it at all...(Orginal, but un-called for...)
Bor
Read the comments first before grading this answer...
Later
BoRiS
OK OK, but still then this question just lies there and gets historic or should I say pre-historic.
When you main form is minimized the Application objects OnMinimize is called. Respectively when you press the application icon on the taskbar Application's OnRestore event is triggered. Seek TApplication from Delphi Help and find OnMinimize event example.
Regards, Igor