Reputation: 21
Is there any way to change backlight turn off TIME using programming(Preferred c# or vb.net other c++ can be used too)? I guess, may be it is changed using registry info or API.
Manually, it is done by:
Setting > Backlight (Battery Power and External Power)
Thank you
Upvotes: 1
Views: 2139
Reputation: 621
::SystemParametersInfo
does it.
Specify uiAction
parameter to SPI_SETBATTERYIDLETIMEOUT
to adjust "battery timeout" and/or SPI_SETEXTERNALIDLETIMEOUT
for "AC timeout".
See detailed information on msdn.
Upvotes: 0
Reputation: 67178
Adjust the following registry keys (which is what the CPL does):
[HKEY_CURRENT_USER\ControlPanel\Backlight]`
"UseBattery"=dword ;if '1' turn off the backligh after "BatteryTimeout" seconds
"UseExt"=dword: ;if '1' turn off the backligh after "ACTimeout" seconds
"BatteryTimeout"=dword:X ;backlight timeout in seconds
"ACTimeout"=dword:Y ;backlight timeout in seconds
Then broadcast a WM_SETTINGCHANGE message.
Upvotes: 1