Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Form ONMinimize Event, how?

Posted on 1998-06-10
8
Medium Priority
?
2,191 Views
Last Modified: 2008-02-01
How to get informed when main form is minimized,
(or maximized again)
0
Comment
Question by:bor061297
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Expert Comment

by:inter
ID: 1352096
Hi,
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
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1352097
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(Sender: TObject);
begin
 ShowMessage('Minimize');
end;

procedure TForm1.AppMaxMessage(Sender: TObject);
begin
 ShowMessage('Maximize');
end;

Hope this helps...

Later
BoRiS
0
 
LVL 1

Accepted Solution

by:
michaue earned 200 total points
ID: 1352098

     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(Sender: TObject);
     begin
      ShowMessage('Minimize');
     end;

     procedure TForm1.AppMaxMessage(Sender: TObject);
     begin
      ShowMessage('Maximize');
     end;
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 4

Expert Comment

by:BoRiS
ID: 1352099
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
0
 
LVL 1

Expert Comment

by:michaue
ID: 1352100
Can't blame someone for trying ....

And when you have an answer DON'T use the comment option ....
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1352101
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
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1352102
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
0
 
LVL 1

Expert Comment

by:michaue
ID: 1352103
OK OK, but still then this question just lies there and gets historic or should I say pre-historic.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question