I need to determine when the IDE becomes the foreground process from a VSPackage. Right now I have a timer set up that calls into the user32.dll's GetForegroundWindow function after acquiring the main window handle via hwnd = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle.
Is there an event driven way to do this?
Thanks!