Bueno, pues no es tan dificil
Código: Seleccionar todo
http://msdn.microsoft.com/en-us/library/ms686307(VS.85).aspx
bAlertable [in]
If this parameter is FALSE, the function does not return until the time-out period has elapsed. If an I/O completion callback occurs, the function does not return and the I/O completion function is not executed. If an APC is queued to the thread, the function does not return and the APC function is not executed.
If the parameter is TRUE and the thread that called this function is the same thread that called the extended I/O function (ReadFileEx or WriteFileEx), the function returns when either the time-out period has elapsed or when an I/O completion callback function occurs. If an I/O completion callback occurs, the I/O completion function is called. If an APC is queued to the thread (QueueUserAPC), the function returns when either the timer-out period has elapsed or when the APC function is called.
SkyWeb07, eso que dices es porque mientras esta en un Sleep el programa no responde a los mensajes que windows le envia... asi que solo hace falta hacer algo como esto:
Código: Seleccionar todo
Public Sub SleepInterval(ByVal dwMilliseconds As Long, Optional ByVal dwInterval As Long = 200)
Dim i As Long
For i = 0 To (dwMilliseconds / Interval)
Call Sleep(Interval)
Next i
End Sub
Uso:
No lo he provado, pero debe ir...