954,558 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Find Power Scheme Options

Hi,

I have a real time application which I write and and support in VB5 running under Windows 98 to XP.

If the user has set the options under Power Scheme to turn off the disk or processor it can cause problems to the system.

Does anyone know how to programatically find the settings ? I have found a way of finding the scheme, but users can change setting in the scheme, hence I need to find the settings.

Thanks

Denis

DenisOxon
Posting Whiz
355 posts since Jan 2007
Reputation Points: 22
Solved Threads: 19
 

The only resort in such cases is the registry. You can always pull out the information regarding the power settings of the client machine and program your logic accordingly.

You can find the power management related keys at HKEY_CURRENT_USER\Control Panel\PowerCfg. For registry related VB functions look for GetSetting( ) and SaveSetting( ) in the MSDN.

Hope it helped, bye.

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You