* First it's necessary to add Microsoft.VisualBasic.dll in References for your solution, If you try "Add Reference ..." you will find it in ".NET" page tab in new opening window.
* Next, you need to include Microsoft.VisualBasic namespace to your code
* Then you can activate another application by the application title or Its ProcessID as following:
...
using Microsoft.VisualBasic
...
Interaction.AppActivate("App Title or ProcessID");
Note: If your application is minimized, it will be activated but AppActivate does not restore the application window (it doesn't come up).
No comments:
Post a Comment