minimizing other application

Posted on 2002-05-07
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?
Question by:girlswants_me
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

Expert Comment

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);

Accepted Solution

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

Good luck

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Downloading email attachments 2 85
Multiple image collision 13 89
Delphi: ForceDirectory plain function 7 50
Firemonkey Tcameracomponent resultion 1 25
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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