0

Is there any other way to turn ON the backlight in Windows CE?? Presently I am setting the event "PowerManager/ActivityTimer/UserActivity" which eventually keeps back light ON. I also want to monitor if there is activity on device like touch etc by user. If there is no activity by the user for specified time, I want to do a application specific log off. Since we want to keep the back light we are setting above event manually but now it is creating the problem to measure actual user activity.

Is there any solution?

Thanks, Omky

Omkar
  • 2,129
  • 8
  • 33
  • 59

1 Answers1

0

Each device is going to have it's own specific driver for backlight, probably accessed by DeviceIoControl calls. On the CE devices I've worked with these APIs don't turn on the backlight however, but control timeout and intensity settings. You can probably use SetDevicePower() or SetPowerRequirement() APIs, though I've never used them.

I have used "PowerManager/ActivityTimer/UserActivity" event to trigger the backlight on. I believe CE sets this same event from mouse and keyboard activity. I have tried unsuccessfully to detect activity by waiting on this event, but the problem is there's no guarantee your thread will be scheduled when it is set. You then must re-set the event to trigger normal system behavior.

You can capture keyboard activity SetWindowHookEx, see http://www.codeproject.com/KB/windows/wincekbhook.aspx. There are C# articles on code project site as well. Note on CE devices I've used only a single hook can be set, though on WM I have not found this.

I would suspect you could snoop mouse input too, I'm not sure how.

Damon8or
  • 527
  • 2
  • 11