on a P4 with WinXP : work fineVB Code:
Private Const WaitTime = 150 Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long) Private Declare Function GetTickCount Lib "winmm.dll" Alias "timeGetTime" () As Currency Private Const TC As Long = 10000 Public Sub Wait(ByVal dwMilliseconds As Long) Dim i As Long, zz As Currency If dwMilliseconds = 0 Then Exit Sub i = dwMilliseconds zz = GetTickCount * TC Do Sleep WaitTime i = i - WaitTime DoEvents Loop Until (i < (WaitTime / 2)) And (((GetTickCount * TC) - zz) >= dwMilliseconds) End Sub
on a Celeron 600 with Win2K : work fine
on a P3 with WinMe : overflow error
why i get overflow error on WinMe ?




Reply With Quote