John Wood

Hello,

Is there any way of bringing up the Time tab from Start>Settings>Clock & Alarms in PPC2003 and WM5

I need to be able to set the clock and time zone etc accurately from within my program, and this tab does just what's needed.

Thanks for any help,

John



Re: Smart Devices VB and C# Projects Changing clock settings programmatically

Peter Nowak (Germany)

Hi

take a look at this sample. It is easier to set the time directly from code.

I hope that helps.

Cheers, Peter





Re: Smart Devices VB and C# Projects Changing clock settings programmatically

John Wood

Thanks Peter,

I may have to end up doing that, but it will also involve me setting up the list of time zones, and adding timers so the time updates continuously on my time setting form. As there is obviously code in the mobile that does exactly what I need (ie the Clock & Alarms Time panel) it would really be much simpler just to call up that panel if that were possible.

John





Re: Smart Devices VB and C# Projects Changing clock settings programmatically

ScubaSteve20001

To bring up the clock control panel applet you should be able to do the following (I just created this in VB.NET, C# should be a simple conversion though):

Code Block

Dim program As New Process()
program.StartInfo.FileName = "ctlpnl.exe"
program.StartInfo.Arguments = "cplmain.cpl,16"
program.Start()



Where '16' is the control panel applet number for the "Clock & Alarms" applet which may vary be device type.




Re: Smart Devices VB and C# Projects Changing clock settings programmatically

John Wood

Thank you ScubaSteve20001

Just the job!

However, if I set

program.StartInfo.Arguments = "cplmain.cpl, 16, 0"

to try and ensure that it always starts on the TIME tab, this doesn't seem to work. It just opens up the clock on the previously active tab. Any ideas on forcing that specific tab to display.

Thanks

John





Re: Smart Devices VB and C# Projects Changing clock settings programmatically

John Wood

See this posting for details of how to flush timezone changes through so your program seees the new settings:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2401821&SiteID=1

John