How to set the pc clock

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hard to believe but I can't find anything that shows how to set the clock
programmatically with VB.NET

I do not want to use the net time command.

Thanks.
 
Why not call directly the control panel dialog like this:

Process.Start( "control.exe", "timedate.cpl" );

Lionel.
 
Any suggestions beside the use of a CPL file ? There has to be a way of
doing this with some functions somewhere !?
 
Now you're talking ! I also found a really good one from the .net framework
SDK

Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Samples\Technologies\Interop\PlatformInvoke\WinAPIs\VB\SysTime.vb

BY the way, is there anything similar to get the system time from a remote
computer?
 

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

Similar Threads

Phone Clock 4
Show calendar on Echo Show all the time 9
Internal clock problem 2
Daily Time Sheets with Rounding 1
Command Line As Admin: Endless Clock? 6
taskbar clock 7
clock 3
Setting System Clock 1

Back
Top