Danny Hiemstra wrote:

> Is there a way to detect if a specified program e.g. firefox.exe is
> active / on top?

One way is to use the GetForegroundWindow() Windows API. In case the 
user is in a dialog window, you might need to step back through the 
ownership chain to get the real main window. Then check the window class 
name for the application's main window, often that gives away the 
application.


Best regards,

Jari Williamsson