Need Some Expert Help
Hello. After scanning variouse forums for some time, I have learned a bit more. The way to turn the screen off while leaving the device on is to set the registry value to 0 in Registry CurrentUser\ControlPanel\Backlight\Brightness. I have managed to do this with no trouble using the Registry Library.
Sub App_Start
reg.New1 'reg is Registry Object
reg.RootKey(reg.rtCurrentUser)
reg.SetDWordValue("ControlPanel\BackLight","Brightness", 4) ' Using 4 instead of 0 for testing.
End Sub
The registry value changes with this code BUT this change will not be recognized by the device until a "BackLightChangeEvent" is fired from the control panel (this is where I am having trouble) at which time the new registry setting are applied. I have tried toggling Backlight On and Backlight Normal with the Hardware Library but apparently this does not trigger the event.
I found this C# code on a forum.
'If Changed some item setting within BackLight registry, you can trigger
'BackLightChangeEvent to let system accept new setting immediately.
HANDLE hEvent = CreateEvent(NULL, FALSE, TRUE, L"BackLightChangeEvent");
if (hEvent) {
SetEvent(hEvent);
CloseHandle(hEvent);
}
I spent a couple of hours trying to transpose it to the Door library but it's quite obviouse that I'm in over my head and I'm not sure if this is even possible.
Anyone with some experience with the .Net Framework care to chime in? Is this possible? Be advised that the registry setting locations and even the Event name may be OEM specific. But I believe the defaults are as described above and should be this way for many devices. Thanks Again!