Solved

minimizing other application

Posted on 2002-05-07
2
118 Views
Last Modified: 2010-04-04
How can i minimize a running application. like for example
the MIRC is running and i only want that application will minimize, how can i do it?
0
Comment
Question by:girlswants_me
2 Comments
 
LVL 2

Expert Comment

by:Tasomia
ID: 6993253
First you need the handle of the Window then
send a WM_SYSCOMMAND message with SC_MINIMIZE.

Example to minimize notepad:

hWindow := FindWindow('notepad',nil);

SendMessage(hWindow, WM_SYSCOMMAND, SC_MINIMIZE, 0);
0
 
LVL 8

Accepted Solution

by:
Cesario earned 60 total points
ID: 6993259
procedure TForm1.Button1Click(Sender: TObject);
VAR
  h : THandle;
begin
  // "AOL" is the caption with Application you whant to minimize
  h := FindWindow ( NIL,'AOL');
  IF H<>0
    Then ShowWindow(h,sw_Minimize);
end;

Good luck
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

15 Experts available now in Live!

Get 1:1 Help Now