Solved

Sending messages

Posted on 1997-08-25
1
160 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

17 Experts available now in Live!

Get 1:1 Help Now