well, you can know if your program has an active focus by using the user32.dll and the user32.decls from the code archives:
api_getactivewindow()
returns 0 or window handle if the windows is focused.
Hope it helps...
api_getactivewindow()
returns 0 or window handle if the windows is focused.
Hope it helps...