DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 19 Jul 2007 18:44:15 +0300,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    Moshe Peleg
          2    ctacke/ ctacke[at]opennetcf[dot]com


Power off detection   
Hi,

From what I've read in teh forum, there is no way to get a warning that the 
power off was clicked (on most pda's).
Is there a "human" ;-) way to figure out that the system was turned on?

There is an event I must perform on system powerup.
Currently I'm running a special thread that check if more than 1 second 
passed since last check ...

This is like scratching your left ear with your right arm.

Thanks,

MP.
Date:Thu, 19 Jul 2007 18:44:15 +0300   Author:  

Re: Power off detection   
There are two notifications that you can use - one from the system 
notifications, and one from the power manager.  The Smart Device Framework 
has them both wrapped into managed events (in the 
OpenNETCF.WindowsCE.DeviceManagement and PowerManagement classes IIRC).  The 
other option is to hook them yourslef with P/Invokes - code for both should 
be available (though most likely in C) on the web.


-- 

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


"Moshe Peleg"  wrote in message 
news:%23mzUquhyHHA.3940@TK2MSFTNGP05.phx.gbl...

> Hi,
>
> From what I've read in teh forum, there is no way to get a warning that 
> the power off was clicked (on most pda's).
> Is there a "human" ;-) way to figure out that the system was turned on?
>
> There is an event I must perform on system powerup.
> Currently I'm running a special thread that check if more than 1 second 
> passed since last check ...
>
> This is like scratching your left ear with your right arm.
>
> Thanks,
>
> MP.
>
> 
Date:Thu, 19 Jul 2007 10:49:49 -0500   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us