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

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.