|
-
Jan 22nd, 2008, 06:11 PM
#10
Re: [2005] Single Instance Application
 Originally Posted by VBDT
I think you could use SendMessage Api method to send a message to the app instance main window.
To send message to the window you need its handle so you could use Process.MainWindowHandle. It is possible that there might be more than one process with the same name since there might be more than one app instance therefore you might want to loop through the all processes and send the same message to the windows that corresponds to your app.
The message can be custom message and let say Lparam or W param contains the message you want to pass.
This is not tested but worth to try.
I have thought about using custom messages too. I actually have a few possible solutions on the table that I am currently testing, so I will post back with the proceedure and result of each of these methods once I have tested them all. Hopefully one of them is a perfect resolution to the issue.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|