Solved

Form ONMinimize Event, how?

Posted on 1998-06-10
8
2,055 Views
Last Modified: 2008-02-01
How to get informed when main form is minimized,
(or maximized again)
0
Comment
Question by:bor061297
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 50 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Component or function to create an ICS-file 2 90
How to convert wav to mp3 in delphi 9 137
IExtractImage Delphi 14 162
Working with hours 3 31
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now