Link to home
Start Free TrialLog in
Avatar of kctan100
kctan100

asked on

Detect Win95/Win98 idle state

How do my program detects if win95/win98 is in idle state/screen saver is running/power saving mode ?

Thank you.
Avatar of jhance
jhance

See the SDK docs on WM_ENTERIDLE.  

Have your app process the WM_ENTERIDLE message.  When it comes, the system is idling and you can do whatever...
ASKER CERTIFIED SOLUTION
Avatar of robpitt
robpitt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, you are right, I misinterpreted this question.  I see now that the user was indeed asking about Windows in general and not his app.

On place to look is...

Look at "SystemParametersInfo" the call supports parameters such as...
SPI_GETSCREENSAVERRUNNING
SPI_GETLOWPOWERACTIVE
SPI_GETPOWEROFFACTIVE

Also you could consider running a tread at low priority (see SetThreadPriority), and trying to figure out if you are getting the lions share of the CPU.

In general good luck - none of this stuff is going to work reliably for you. :-(