שלום.טוב הקוד שאתה צריך בשביל לגשת לזמן מערכת בעזרת API הוא:
'API Decleration Private Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)'Type that holds the return value of the above function 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 'EXAMPLE USING FORM LOAD Private Sub Form_Load() 'declare variable as SYSTEMTIME type Dim SysTime As SYSTEMTIME 'Get the system time (local time) GetLocalTime SysTime 'Give a message box with the date MsgBox "The Date is:" & SysTime.wDay & "-" & SysTime.wMonth & "-" & SysTime.wYear 'Give a message box with the time MsgBox "The Time is:" & SysTime.wHour & ":" & SysTime.wMinute & ":" & SysTime.wSecond & "." & SysTime.wMilliseconds End Sub
|
אני מקוה שזה עוזר לך,
א.