[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Detect Form restore

Posted on 2000-01-23
1
Medium Priority
?
218 Views
Last Modified: 2010-04-04
I need to detect when a form is restored after it is minimized.
0
Comment
Question by:gianluca
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 150 total points
ID: 2379524
You could do it by trapping the WM_SIZE message in your form like this:

    procedure WMSize(var Message: TWMSize); message WM_SIZE;

procedure TForm1.WMSize(var Message: TWMSize);

begin
  if WindowState = wsMinimized then
    // do something;

  Inherited;

(* Or you may need to follow it like this:

  if (Message.width = 0) and (Message.height = 0) then
    FormMinimsed := True
  else
    if FormMinimised then
      begin
        FormMinimised := False;
        // Do your stuff here
      end;

  Inherited;
*)
end;
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

608 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