,
Share this with your friends 
 

Delay function in V.Net

3 ratings Views 815 
Author: Arun_9cec75f (Arun Manoharan)  View Profile |  View other solutions by this author

Question / Problem


Creating a Delay function

Solution

Declare Function GetTickCount Lib "kernel32" () As Integer
#Region "DELAY FUNCTION"
    Public Sub DELAY(ByVal ms As Single)
        Dim OldTime As Long
        OldTime = GetTickCount
        Do Until GetTickCount >= OldTime + ms
            Application.DoEvents()
        Loop
    End Sub
#End Region


Applies to

VB 2005

Rank It

Login to rank it

Report


Advertisement