Click here to Skip to main content
16,019,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Goodmorning sir/ma'am.

Is there anyone who know how to change automatically the date of PC in windows 7 using vb.net?

Thank You so much, any suggestions and opinion, will be so much appreciated!.
GOD BLESS.
Posted
Updated 24-Mar-13 17:21pm
v3

1 solution

You can do it by calling the raw Windows API function SetSystemTime:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724942%28v=vs.85%29.aspx[^].

You can invoke this function from your .NET application using P/Invoke, but you don't have to do it by yourself; this is already done for you: http://www.pinvoke.net/default.aspx/kernel32/setsystemtime.html[^].

Enjoy!

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900