Sets the time on the local machine. Very usefull.
Sets the time on the local machine. Very usefull.
API Declarations
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 SetLocalTime Lib "kernel32.dll" (lpSystemTime As SystemTime) As Long
Rate Sets the time on the local machine. Very usefull.
(1(1 Vote))
Public Sub SetNewTime(NewHour As Integer, NewMinute As Integer, NewSecond As Integer)
' Set the system time with Hours, Minutes, Seconds
Dim SetTime As SystemTime
Dim RetVal As Long
SetTime.wHour = NewHour
SetTime.wMinute = NewMinute
SetTime.wSecond = NewSecond
SetTime.wMilliseconds = 0
SetTime.wDay = Day(Date)
SetTime.wMonth = Month(Date)
SetTime.wYear = Year(Date)
' Set time and date.
RetVal = SetLocalTime(SetTime)
End Sub
Sets the time on the local machine. Very usefull. Comments
No comments yet — be the first to post one!
Post a Comment