public static GetFocusedWindowHandle ( ) : |
||
return |
// Runs on the Automation thread (before syncContextAuto starts pumping) public void TryInitialize() { Debug.Print("### WindowWatcher TryInitialize on thread: " + Thread.CurrentThread.ManagedThreadId); var focusedWindowHandle = Win32Helper.GetFocusedWindowHandle(); string className = null; if (focusedWindowHandle != IntPtr.Zero) { className = Win32Helper.GetClassName(focusedWindowHandle); } UpdateFocus(focusedWindowHandle, className); }