Adblock breaks this site

Wait

Discussion in 'Programming General' started by Belgin_Mage, Jul 30, 2008.

  1. Belgin_Mage

    Belgin_Mage Guest

    Referrals:
    0
    Wait

    I need a Wait thats simple to use and that acctualy works.. Ive been searching for 1 hour and dont find anything that works
     
  2. cp

    cp an cat
    Banned

    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0
    Wait

    Code:
    System.Threading.Thread.Sleep(10) 'in milleseconds
    I think that should work at least, I don't use VB.
     
  3. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    Wait

    Thats .Net, cp_

    here is VB

    Code:
    Public Declare Function timeGetTime Lib "winmm.dll" () As Long
    
    Public Sub Wait(TimeOut As Long)
        Dim TimeNow As Long
        TimeNow = timeGetTime()
        Do
            DoEvents
        Loop While TimeNow + TimeOut > timeGetTime()
    End Sub
    Use

    Code:
    wait 100
     
  4. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Wait

    You're either lieing or incredibly stupid.
     
  5. Belgin_Mage

    Belgin_Mage Guest

    Referrals:
    0
    Wait

    I found alot that worked, but all they did was freeze.. I dont want freeze:laugh:
     
< What Language Next? | Witch programming language is best? >


 
 
Adblock breaks this site