PUES A MI NO ME LO DA!!
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Declare Function MsgWaitForMultipleObjects Lib "user32" _
(ByVal nCount As Long, pHandles As Long, ByVal fWaitAll As Long, _
ByVal dwMilliseconds As Long, ByVal dwWakeMask As Long) As Long
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, _
ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Sub Main()
Static t As Boolean
If t <> True Then _
SetTimer hwnd, 0, 1, AddressOf TimerProc: t = True
SafeSleep (3600)
End Sub
Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
' EJECUCION EN SEGUNDO PLANO
'///////////////////////////////////////////////////////
' [ CODE code ]:::::::::::::>>
'///////////////////////////////////////////////////////
End Sub
Sub SafeSleep(ByVal inWaitSeconds As Single) 'PAUSA Y NO CARGA LA CPU!!!
Const WAIT_OBJECT_0 As Long = 0
Const WAIT_TIMEOUT As Long = &H102
Dim lastTick As Single
Dim timeout As Long
timeout = inWaitSeconds * 1000
lastTick = Timer
Do
Select Case MsgWaitForMultipleObjects(0, 0, False, timeout, 255)
Case WAIT_OBJECT_0
DoEvents
timeout = ((inWaitSeconds) - (Timer - lastTick)) * 1000
If timeout < 0 Then timeout = 0
Case Else
Exit Do
End Select
Loop While True
Main ' VUELVE AL PROCEDIMIENTO PRINCIPAL
End Sub