Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending message from one instance to another

Status
Not open for further replies.

chellakudam

Programmer
Oct 23, 2003
1
US
Hi Friends,

I want to call my pb application from a non-pb application (using run command). If another instance of the pb application is running, I need to open a window with a parameter ( which I pass from the non-pb application). I can find handle of the window using FindWindowA command. My question is how do I send a message from open event of my second pb instance app object to a window in the other instace which is already running and close my new instance? Any help appreciated.

Robert
 
just get the handle of a window in the other app, and trigger an event in that window:

ll_handle = FindWindow("Class", "Title")
if ll_handle > 0 then
Post ( ll_handle, 1025, 0, 0 )
end if

in the receiving window, map the event pbm_custom02 to something and put do whatever you have to do.

--
regards,
Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top