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?
 
Back
Top