VB Code:
  1. Private Const WaitTime = 150
  2.  
  3. Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
  4.  
  5. Private Declare Function GetTickCount Lib "winmm.dll" Alias "timeGetTime" () As Currency
  6. Private Const TC As Long = 10000
  7.  
  8. Public Sub Wait(ByVal dwMilliseconds As Long)
  9.   Dim i As Long, zz As Currency
  10.   If dwMilliseconds = 0 Then Exit Sub
  11.   i = dwMilliseconds
  12.   zz = GetTickCount * TC
  13.   Do
  14.     Sleep WaitTime
  15.     i = i - WaitTime
  16.     DoEvents
  17.   Loop Until (i < (WaitTime / 2)) And (((GetTickCount * TC) - zz) >= dwMilliseconds)
  18. End Sub
on a P4 with WinXP : work fine
on a Celeron 600 with Win2K : work fine
on a P3 with WinMe : overflow error

why i get overflow error on WinMe ?