domingo, 28 de abril de 2013

Delay (Retraso) en Visual Basic 6


EscenarioSistema Operativo: Windows 7 Enterprise
Lenguaje de Programación: Visual Basic 6.0

Implementación

Public Sub pEsperarNSegundos(ByVal pnCtadSegundos As Integer)
    Dim sFecha As String
    sFecha = Format(Time, "hh:mm:ss")
    Do While True
        If DateDiff("s", sFecha, Format(Time, "hh:mm:ss")) > pnCtadSegundos Then
            Exit Do
        End If
    Loop
End Sub

Llamada: mADO.Otros_pEsperarNSegundos 3 'Espera 3 segundos

1 comentario: