如何在Windows 7中使用vb.net更改Pc的日期 [英] How to change date of Pc using vb.net in Windows 7
本文介绍了如何在Windows 7中使用vb.net更改Pc的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Goodmorning先生/ ma''am。
有没有人知道如何使用vb.net自动更改Windows 7中的PC日期? />
非常感谢你,任何建议和意见,都会非常感激!
GOD BLESS。
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.
推荐答案
您可以通过调用原始Windows API函数来执行此操作SetSystemTime
:
http://msdn.microsoft.com/en-us/library/windows/desktop /ms724942%28v=vs.85%29.aspx [ ^ ]。
您可以使用.NET应用程序调用此函数P / Invoke,但你不必自己做;这已经为您完成了: http://www.pinvoke.net/default.aspx/kernel32/setsystemtime .html [ ^ ] 。
享受!
-SA
You can do it by calling the raw Windows API functionSetSystemTime
:
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
这篇关于如何在Windows 7中使用vb.net更改Pc的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文