Hi,

I am making an application for work studio. This means the user
is asked a question at random time within the workingday.

When in idle mode the device should be turned on/off by the application.
However I am not shure how to approace this task. Any sugestions would be
appriciated.

Thanks Henrik.

Re: Turning device on/off at predefined time ? by Peter

Peter
Tue Oct 05 06:18:38 CDT 2004

You can turn off the device by simulating a VK_TPOWER keypress by P/Invoking
the keybd_event API function.

You can use CeRunAppAtTime to schedule your application to start up again
(and wakeup the device) at a predefined time. You'll find this ready-wrapped
for the Compact Framework in OpenNETCF.Win32.Notify namespace
(www.opennetcf.org/sdf/). There is a SendKeyboardKey implementation in
OpenNETCF.Win32.Core. You may need to check the header files for the value
of VK_TPOWER (which is equal to VK_F18).

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups

"HenrikFogh" <hfj@hh-automation.dk> wrote in message
news:u4MbUosqEHA.2856@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I am making an application for work studio. This means the user
> is asked a question at random time within the workingday.
>
> When in idle mode the device should be turned on/off by the application.
> However I am not shure how to approace this task. Any sugestions would be
> appriciated.
>
> Thanks Henrik.
>
>