public ForegroundWindowListener() { WindowEventHookInstance = new WinEventHookDelegate(WindowEventHook); //Install(); }
private static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, WinEventHookDelegate lpfnWinEventProc, int idProcess, int idThread, int dwflags);