If your application involves displaying screen content you probably have come across the issue where the screen backlight turns off after a few seconds of no keypresses. You can override this behaviour in your application using a couple of underdocumented API Power-Management functions. Here is a VB.NET snippet for .NETCF to keep the backlight on:-
Namespace
Public
Release()
PwrDeviceUnspecified = -1
D0 = 0
D1 = 1
D2 = 2
D3 = 3
D4 = 4
PwrDeviceMaximum = 5
handle = SetPowerRequirement("BKL1:", PowerState.D0, 1, IntPtr.Zero, 0)
result = ReleasePowerRequirement(handle)
handle = IntPtr.Zero
End
Thanks to Paul O'Brien from MoDaCo for inspiring and helping test the code.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.