|
-
Oct 17th, 2010, 02:50 AM
#1
Thread Starter
Junior Member
Too fast for VB to detect? Stopwatch.
Hi,
I put
Label1.Text = Watch.Elapsed.Milliseconds
And notice that it goes from 0 to 1000 milliseconds and then back to 0 starting over every time.
Ok, no problems
Then I do some tests and put,
If e key pressed = True Then
Count = Watch.Elapsed.Milliseconds
label2.text=count
End If
Whenever I press e, it logs the value in count and displays it.
No problems.
Now if i do this,
If Watch.Elapsed.Milliseconds = 5 (or any number from 0 - 1000) Then
End
End If
This should end program once it hits 5 milliseconds.
But the problem is it doesn't.
On one of my test runs i notice it does end, but only after a little while. Does this mean VB has a hard time detecting the stopwatch or something?
How can i fix this?
(I am beginner so please, not too technical or vague.)
BTW: Windows XP Pro 64bit,
VB.NET 2010 Express
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
|