Private Sub Form_Load()
Text1.text = time
for x = 1 to 10000
Print "Frost"
next
Text2.text = time
Timer1.Interval = 1
Label1.Caption = ""
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Time
End Sub
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
Alright, I've Got It:
You Need To Add A Plain Ole Standard Module (It's A Good Practice), inside of the module add this:
Module Code:
Public Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
Public Declare Function SetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME) As Long
Public 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
In your form load event, You'll need this code:
Form Load Code
Dim GMTime As SYSTEMTIME
Dim TheTime As String
GetSystemTime GMTime
Text1.Text = GMTime.wHour & ":" & GMTime.wMinute & ":" & GMTime.wSecond & "." & GMTime.wMilliseconds
For x = 1 To 10000
Print "Frost"
Next
GetSystemTime GMTime
Text2.Text = GMTime.wHour & ":" & GMTime.wMinute & ":" & GMTime.wSecond & "." & GMTime.wMilliseconds
Timer1.Interval = 1
Label1.Caption = ""
And Lastly in your timer event:
Timer Event Code:
Dim GMTime As SYSTEMTIME
Dim TheTime As String
GetSystemTime GMTime
Label1.Caption = GMTime.wHour & ":" & GMTime.wMinute & ":" & GMTime.wSecond & "." & GMTime.wMilliseconds
So Far, This works flawlessly for me. Let me know how it works for you.... if you need an additional help, let me know.
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
wow!!! i cant thank you enough that is absolutely perfect!!! well done! Sorry its a little bit late, was away for a couple of days.
(a happy)Frost
My Pleasure. If you need any other assistance, just let me know.
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
I didn't Know that. I appreciate that knowledge, since 1/18th isn't as reliable of a system to the millisecond. May I ask where you found this information?
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215