Sending messages

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.
robertbAsked:
Who is Participating?
 
gfk081397Connect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.