[2005] Advanced question? Get reference to another app’s main window.
Hi guys, does some one knows how to get reference to an application main form from another project in the same solution. Here is the scenario: I have a windows project with installer project in the same solution. The purpose of the installer project is to provide some futures at the application setup and do some cleaning after the app uninstalls. Now, I want to be able to close the application (if it is running) at the uninstall time.
I can’t simply use process object and close the main window because the application’s main window’s “ShowInTaskbar” property is set to False and it is not visible to process object. I also can’t kill the application because it is hooked to windows by Api function, so I should remove it before exiting the app.
Is it possible to use Reflection or any other classes or methods to get reference to the app’s main window?
Thanks in advance!
VBDT
Re: [2005] Advanced question? Get reference to another app’s main window.
I know that .Net Remoting allows interprocess communications, thought I have never used it. Maybe that will help you accomplish what you are trying to do:
http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx