Пример #1
0
        public static void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
        {
            string activeWindowTitle = GetActiveWindowTitle();
            WindowActivatedEventArgs windowActivatedEventArgs = new WindowActivatedEventArgs(activeWindowTitle, hwnd);

            windowActivatedHandler.Invoke(null, windowActivatedEventArgs);
        }
Пример #2
0
 static void HookManager_WindowActivated(object sender, WindowActivatedEventArgs e)
 {
     StepDiagram.AddTaskActive(e.WindowName, e.Handle);
 }