Pocket PC Clock

  • Thread starter Justin Beckwith
  • Start date
J

Justin Beckwith

On the main form of my application, I provide the user with the
current datetime, similar to the pocket pc Today screen. I would like
the user to be able to click that date, and bring up the built in CE
Clock settings. Is there any way to instantiate this form from the
compact framework? For that matter, how would you get access to
other programs on the device programatically?
 
P

Peter Foot [MVP]

You can launch other processes using the CreateProcess or ShellExecuteEx API
functions through P/Invoke, or use the ready-made Process class in OpenNETCF
SDF (www.opennetcf.org/sdf/)

To launch any of the control panel applets you can call ctlpnl.exe with a
specific command line e.g. for the Time control panel:-

Process.Start("ctlpnl.exe", "cplmain.cpl,16,0")

You can find more control panel identifiers here:-
http://www.pocketpcdn.com/articles/controlpanel.html

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
 
P

Peter Foot [MVP]

Looking at the CE.NET 4.2 Emulator I would imagine it to be the same (I
haven't tested this example on ce.net yet), although possibly the id for the
DateTime applet is different, it still appears to be implemented within
cplmain.cpl.
However since CE is modular there may be differences depending on the shell
your device is equipped with.

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
 
P

Paul G. Tobey [eMVP]

The Windows CE 4.2 (not Pocket PC), shell launches Clock.exe first. If
that's not present, it launches CtlPnl.exe with the parameter "clock.cpl".

Paul T.
 
D

Dave Hall

On My CE.NET 4.2 device, I had to specify the paths. I also had a different
control panel identifier than petr showed. My C# code lookes like this:

proc.Exec(@"\Windows\CtlPnl.exe", @"\Windows\cplmain.cpl,13");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top