I was wondering if it was possible for c# to be able to identify an active window. Such as if Chrome or Firefox is the active window, the program would respond to a list of commands or cases specific to when that window is active.
Asked
Active
Viewed 146 times
0
-
http://stackoverflow.com/questions/2029495/c-sharp-get-information-about-current-active-window – yakiro Sep 25 '13 at 18:05
1 Answers
1
I believe you would need to P/Invoke the GetForegroundWindow Function to get the window the user is interacting with, and then use the other Window Functions to get more information about the window.

Alan
- 7,875
- 1
- 28
- 48