How can i get application handle in C#
Loading
How can i get application handle in C#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Jul 17, 2008, 6:35 AM
If you mean the current application's process handle, you can get this with:
System.Diagnostics.Process.GetCurrentProcess().Handle
If you mean the handle of the main window, this can be obtained with:
System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle