Solved

Closing other Apps

Posted on 1997-05-21
2
160 Views
Last Modified: 2012-05-04
My password program is called from a macro in a help file. If the user types in the wrong password, then the help file has to be closed. I know that this has can be done with messages, but how?
0
Comment
Question by:richweed
2 Comments
 
LVL 1

Accepted Solution

by:
sleach earned 50 total points
ID: 1336507
Substitute the  ClassName & caption of the app you want to close into the code below.  If your not sure what they are, use Winsight(included with Delphi).  If you already have the handle to the window, just use it instead of FindWindow.

   PostMessage(FindWindow('ClassName', 'caption'),
   WM_QUIT, 0, 0);

0
 

Author Comment

by:richweed
ID: 1336508
What about closing all windows?
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 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