2010-02-17 4 views

Antwort

3

3rd party aplication startete andere Fenster nicht als Kind Fenster.

Es ist möglich, herauszufinden, was Struktur ist, die Spy ++ Werkzeug verwendet, das mit Visual Studio kommt.

Danach konnte ich notwendig Fenster mit FindWindowEx Funktion WindowClassName (aus Spy ++) finden: lastWindows = FindWindowEx (IntPtr.Zero, lastWindows, m.WindowClassName, null);

2

Verwenden Sie die Win32-API EnumWindows (und wenn Sie EnumChildWindows wollen)

[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)] 
public static extern bool EnumWindows(EnumThreadWindowsCallback callback, IntPtr extraData); 

Dann prüfen Sie, welche jedes Fenster Prozess gehört zur von der Win32-API unter Verwendung GetWindowThreadProcessId

[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)] 
public static extern int GetWindowThreadProcessId(HandleRef handle, out int processId); 
Verwandte Themen