Solved

Sending messages

Posted on 1997-08-25
1
162 Views
Last Modified: 2010-04-06
how i can send a message to a delphi application that i don't know the handle.?
I have try with sendmessage whith HWND_BROADCAST parameter.
0
Comment
Question by:robertb
1 Comment
 

Accepted Solution

by:
gfk081397 earned 50 total points
ID: 1342454
The simplest way to do it is here:

var
  hWnd : integer;
begin
  hWnd := FindWindow(nil, <title of application window>);
  if  hWnd <> 0 then
    PostMessage(hWnd, WM_CLOSE, 0 , 0);

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 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