respond to "go to sleep" and "wake up" events

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

PocketPC's have a habit of going to sleep when they're not used for a
while, or when they're low on power. How can I make my C# application
run code in response to these events? I'm working with hardware that's
turning off on the sleep event, but not turning back on on the wake
event, and I need to make sure that happens myself.

Thanks,

Dan
 
I'm a little unclear on exactly what you need, but the SDF has events for
both sleep and wake. The sleep event code generall won't run until the next
time the device wakes.

www.opennetcf.org/sdf

-Chris
 
Hi

as ctake mentioned there are some events in the OpenNETCF.

For Example:
DeviceManagement.DeviceWake += new
DeviceNotification(DeviceManagement_DeviceWake);
PowerManagement.PowerDown += new
DeviceNotification(PowerManagement_PowerDown);



But be aware, because of some OS related things the events behave a
litlle "strange" e.g. the WakeUp doesn't always fire _once_ when the
device is turned on,...
 
Back
Top