I’m looking to create a C# application that changes content according to which application currently has focus. So if the user is using Firefox, my app would know that. Same for Chrome, Visual Studio, TweetDeck etc.
Is this possible, and if so – how would I go about achieving it?
I have a feeling I’m asking for to much – but it’s worth a try.
Many thanks in advance.
Take a look at
Application.AddMessageFilter, and look for WM_ACTIVATEAPP messages, which will tell you when an app is activated, i.e. receives focus.