node-process-windows icon indicating copy to clipboard operation
node-process-windows copied to clipboard

[Request] Foreground process change event listener?

Open ghost opened this issue 8 years ago • 0 comments

This event listen would listen for when a user changes process windows.

The function in user32.dll is SetWinEventHook with EVENT_SYSTEM_FOREGROUND

You may also need EVENT_SYSTEM_MINIMIZESTART and EVENT_SYSTEM_MINIMIZEEND

Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/dd373640(v=vs.85).aspx

I tried just using getActiveWindow in a interval, but it wouldn't run.

ghost avatar Mar 02 '17 11:03 ghost