Results 1 to 4 of 4

Thread: delay?

  1. #1
    Guest
    Code:
    Private Declare Function GetTickCount Lib "kernel32" () As Long
    
    Private Sub FreezeApp(ByVal dwSeconds As Long)
        dwSeconds = dwSeconds * 1000
        Start = GetTickCount
        Do While GetTickCount < Start + dwSeconds
        Loop
    End Sub
    Usage:
    Code:
    FreezeApp Val(Text1)
    Print "Done"

  2. #2
    Addicted Member KrishnaSantosh's Avatar
    Join Date
    Feb 2001
    Location
    Coimbatore
    Posts
    210
    I Think SleepEx Would Also Work. Anyway I'm Not Sure

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Both Sleep and SleepEx will work, however SleepEx can be "signalled" to return earlier than stated.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Guest
    We can also use VB's Timer function, thus eliminating the need for API.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width