|
-
Jul 26th, 2000, 09:42 PM
#1
Thread Starter
New Member
Hello... does anyone know why this made my vb6 not work? and i have to restart the computer in order for vb to work again?
Dim TimeNow As Long
Dim CurrentTime As Long
MSComm1.RTSEnable = True
TimeNow = GetTickCount
CurrentTime = TimeNow
' Busy wait here for 5 milliseconds
Do Until (CurrentTime - TimeNow > 5)
CurrentTime = GetTickCount
Loop
'Some code here
TimeNow = GetTickCount
CurrentTime = TimeNow
' Busy wait here for 15 milliseconds
Do Until (CurrentTime - TimeNow > 15)
CurrentTime = GetTickCount
Loop
MSComm1.RTSEnable = False
----- If i don't put in the 15ms busy wait and just go on.. then it will not crash... so I don't think it's the GetTickCount... any ideas would be greatly appreciated..
Thanx in advance! =)
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
|