当前位置: 代码迷 >> Windows Mobile >> 请教WM手机软件开发中怎么打开屏幕呢
  详细解决方案

请教WM手机软件开发中怎么打开屏幕呢

热度:56   发布时间:2016-04-25 07:36:36.0
请问WM手机软件开发中如何打开屏幕呢
我在做一个定时的软件(C#),现在到了时间它会自动执行一个程序,但是屏幕却还是关闭的状态下,请问怎么开启屏幕呢,谢谢大家!最好能给源码,我百度谷歌找了好久没找到。

------解决方案--------------------
C# code
 public enum PowerState//电池状态        {            PwrDeviceUnspecified = -1,            FullOn = 0,                       LowOn = 1,                       Standby = 2,                     Sleep = 3,                     Off = 4,               PwrDeviceMaximum = 5        }        [DllImport("CoreDll", SetLastError = true)]        static extern IntPtr SetPowerRequirement(string DeviceName, PowerState State, uint dwDeviceFlags, string Name, ulong Reserved);        [DllImport("CoreDll", SetLastError = true)]        static extern int ReleasePowerRequirement(IntPtr hPowerReq);        [DllImport("coredll.dll")]        private static extern int DevicePowerNotify(string device, PowerState deviceState, int deviceFlags);DevicePowerNotify("BKL1:", PowerState.FullOn, 1);//开背景灯DevicePowerNotify("BKL1:", PowerState.Off, 1);//关背景灯
  相关解决方案