Task: Get Current Greewich Mean Time using GetSystemTime API
Declarations
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 Sub GetSystemTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME)
Dim gtime As SYSTEMTIME
Code
Private Sub Timer1_Timer()
GetSystemTime gtime
Label1.Caption = "Time in Greewich is " & gtime.wHour & ":" & gtime.wMinute & ":" & gtime.wSecond
End Sub