Click to See Complete Forum and Search --> : Find out how long windows has been running
mags
Aug 8th, 2000, 03:46 PM
I found that:
Declare Function GetTickCount& Lib "kernel32" ()
Private Sub cmdWinRun_Click()
MsgBox GetTickCount
End Sub
But what i want to do,is 3 textbox.
1 testbox for the hours
1 for min
and 1 for sec.
it is possible????
Just divide the result:
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Command1_Click()
'Seconds
Text1 = GetTickCount / 1000
'Minutes
Text2 = (GetTickCount / 1000) / 60
'Hours
Text3 = (GetTickCount / 10000 / 60) / 60
End Sub
mags
Aug 8th, 2000, 04:32 PM
thanks alot, i searching and trying so many thing..but i see your code and it was easy..good i suck sometime..
Sorry, I just found a mistake. Change this line:
Text3 = (GetTickCount / 10000 / 60) / 60
To this line:
Text3 = (GetTickCount / 1000 / 60) / 60
[Edited by Megatron on 08-08-2000 at 06:08 PM]
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.