|
-
Feb 23rd, 2001, 08:57 AM
#1
Thread Starter
New Member
Hi!
How do I get hold of the time in 10's of a second in VB 6.0?
Or how do I make a DLL, whose purpose is to get the time in milliseconds, in C++ to use with in VB 6.0?
Please help some students from Bergen, Norway.
-
Feb 23rd, 2001, 09:03 AM
#2
Frenzied Member
I don't know if it will help but the function Timer returns the number of seconds since midnight (and includes decimal places)
eg;
Msgbox Timer
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Feb 23rd, 2001, 09:04 AM
#3
Retired VBF Adm1nistrator
You could always use the timer control.
Have the interval set to 100ms.
Then every time it fires, thats a 1/10th of a second.
You can then add that onto the current time in seconds.
Obviously the two would have to be in sync.
So you'd just start the timer once the seconds of the system clock change.
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Feb 23rd, 2001, 09:17 AM
#4
Fanatic Member
Might try this, along with plenderj's and Buzby's suggestions.
Code:
Private Sub Timer1_Timer()
Label1.Caption = Format(Now(), "hh:nn:ss:") & Mid(Timer, 7, 1)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|