Get handle of an application?
C#
3
Posts
3
Posters
0
Views
1
Watching
-
How can i get the handle of an application like Internet Explorer? Is there a function like FindWindow() in c++? thanks
Not sure, but can't you just use Interop and call the WinApi FindWindow() function ?
R.Bischoff | C++ .NET, Kommst du mit?
-
Not sure, but can't you just use Interop and call the WinApi FindWindow() function ?
R.Bischoff | C++ .NET, Kommst du mit?
Process[] processes = Process.GetProcesses(); for(int x=0;x < processes.Length-1;x++) { try { string name = processes[x].MainModule.FileName; if(name.EndsWith("iexplore.exe")) { Process instance = processes[x]; instance.Handle // use the handle } catch(System.NullReferenceException e) { } }