From: Carl on 20 Oct 2006 05:51 Hello I want to turn on/off the backlight in my application function and the function must follow the Settings->Backlight->(time value in turn off backlight if device is not used for). I use RegSetValueEx to change the BatteryTimeout value. but it's unuseful unless you reset it. So I search the microsoft.public.pocketpc.developer to find the method to solve it, someone mentions that ::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0) is useful. I add the codes in my function, but the backlight status is not changed. Are there some function or api to solve it?? Any suggestion is useful, thanks a lot!!
From: Fabien on 20 Oct 2006 07:52 Hi, You must import and call SetPowerRequirement and ReleasePowerRequirement from the Windows CE API. [DllImportAttribute("coredll.Dll")] private static extern IntPtr SetPowerRequirement(string pvDevice, PowerState DeviceState, int DeviceFlags, IntPtr pvSystemState, int StateFlags); [DllImportAttribute("coredll.Dll")] private static extern int ReleasePowerRequirement(IntPtr hPowerReq); There are a lot of examples of implementation on the Internet. BR Fabien Decret Windows Embedded Consultant C# MCP ADENEO (ADESET) http://www.adeneo.adetelgroup.com/ Carl a écrit : > Hello > I want to turn on/off the backlight in my application function and > the function must follow the Settings->Backlight->(time value in turn > off backlight if device is not used for). > I use RegSetValueEx to change the BatteryTimeout value. but it's > unuseful unless you reset it. > So I search the microsoft.public.pocketpc.developer to find the > method to solve it, someone mentions that > ::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0) is useful. I > add the codes in my function, but the backlight status is not changed. > Are there some function or api to solve it?? > Any suggestion is useful, thanks a lot!!
|
Pages: 1 Prev: Image in notification bubble Next: DirectShow WMV Decoder on WM5 |