How to detect if the Screen Saver is running

I have a b/g app that I wrote in Delphi 3 that logs system info when the user
is active.  I want to suspend the logging when the user is IDLE.

I have tried to trap the WM_IDLE message but because the application is never
active (it runs in the b/g with no form) that message will always appear. So
I figure I would check to see if the screensaver is running - if it is set a
flag - if its not - dont set it. I did a lot of experimenting with
SystemParametersInfo using SPI_SCREENSAVERRUNNING - But I was never able to
detect if it is actually running or not, the call I used was :

if srunning=0 then

It would always return FALSE - no matter what.

Does anyone have any idea how to either :

1 - detect if the Screen saver is currently running?


2 - detect idle time from a b/g program?

Any ideas would be VERY helpful.



-----== Posted via Deja News, The Leader in Internet Discussion ==-----   Create Your Own Free Member Forum