?
Solved

Detect other applications minimizing

Posted on 2003-03-18
2
Medium Priority
?
143 Views
Last Modified: 2010-04-04
Is there any way to detect when another application minimizes, say from it's handle or something? And is there also a way to minimize and maximize another application from it's handle?


Any help would be appreciated
0
Comment
Question by:DiD
2 Comments
 
LVL 6

Accepted Solution

by:
DaFox earned 225 total points
ID: 8164950
Hi DiD.

To your second question:


procedure TForm1.Button1Click(Sender: TObject);
var
  wnd: hWnd;
begin
  wnd := FindWindow(...);
  if IsWindow(wnd) then
  begin
     ShowWindow(wnd, SW_SHOWNORMAL);
     //or
     ShowWindow(wnd, SW_MAXIMIZE);
     //or
     ShowWindow(wnd, SW_MINIMIZE);
  end;
end;

To your first question:

Take a look at the function isIconic(). You'll have to poll the call of the function. If this is not enough (yeah, it actually is bad) you have to subclass the window, I guess.


Markus
0
 

Author Comment

by:DiD
ID: 8166747
Thanks, I've looked at sub-classing and it looks like what i'm after.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses
Course of the Month8 days, 1 hour left to enroll

616 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