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

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…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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