Windows application to detect running apps based on events
I want to make a windows application which runs in background and detect which window is running when a keyboard/mouse event triggered. And what kind of application should be useful for this purpose like WPF or windows servie , console or anyother in visual studio.