Results 1 to 12 of 12
  1. #1
    jakobkorber's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Greensburg, PA
    Posts
    28
    Reputation
    10
    Thanks
    1
    My Mood
    Cheerful

    Question [Help]Sleep/Pause[Solved]

    whats the wait code in visual basic 2008? thanks >.<
    Lady Gaga: PApapapapappap Poker Face
    Producer: One More Time From The Top And Try Not To Stutter
    Lady Gaga: I Dont Sta-sta-sta-stutter
    Producer: oh my god JUST SHUT UP!!!!!
    (blows Brains Out With Pistol)
    Lady Gaga: Misssttaa PraPraPraDucer???????
    ....... OH NOES!!!!!!
    _____________________________________________

  2. The Following User Says Thank You to jakobkorber For This Useful Post:

    Obama (03-11-2010)

  3. #2
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    How long are you trying to make it wait for?

  4. #3
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Sleep() function in the kernel32 library. I think for VB you have to declare these things manually. After you've done this.

    Sleep(milliseconds)

  5. The Following 2 Users Say Thank You to Void For This Useful Post:

    Obama (03-11-2010),powerfear (03-17-2010)

  6. #4
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    In vb 2008
    the code to pause a thread is simply:
    Threading.thread.pause(1000)
    Where 1000 = milliseconds

  7. #5
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    Obama is right. thanks for helping
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  8. The Following User Says Thank You to zmansquared For This Useful Post:

    Obama (03-11-2010)

  9. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    [php]
    ' To Sleep
    System.Threading.Thread.Sleep (1000)
    'To Pause
    System.Threading.Thread.Pause (1000)

    ' Code uses Miliseconds
    [/php]

    Obama was demonstrating the power of google


    :waits for OP' to accept answer:



     


     


     



    The Most complete application MPGH will ever offer - 68%




  10. The Following User Says Thank You to NextGen1 For This Useful Post:

    Obama (03-11-2010)

  11. #7
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    Quote Originally Posted by NextGen1 View Post
    [php]
    ' To Sleep
    System.Threading.Thread.Sleep (1000)
    'To Pause
    System.Threading.Thread.Pause (1000)

    ' Code uses Miliseconds
    [/php]

    Obama was demonstrating the power of google


    :waits for OP' to accept answer:

    Lies, I knew that

  12. #8
    Unkn0wn_h4cker's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    38
    Reputation
    10
    Thanks
    17
    Here =)

    Code:
    Private Declare Sub Sleep Lib "kernel32" _
     (ByVal dwMilliseconds As Long)
    
    Public Sub Wait(Seconds As Single)
    
     Dim lMilliSeconds As Long
     lMilliSeconds = Seconds * 1000
     Sleep lMilliSeconds
    
    End Sub
    or

    Use Call Delay(integer)

    Code:
    Sub Delay(dblSecs As Double)
    Const OneSec As Double = 1# / (1440# * 60#)
    Dim dblWaitTil As Date
    
    dblWaitTil = Now + OneSec * dblSecs
    Do Until Now > dblWaitTil
    DoEvents ' Allow windows messages to be processed
    Loop
    Last edited by Unkn0wn_h4cker; 03-11-2010 at 01:00 AM.

  13. The Following 2 Users Say Thank You to Unkn0wn_h4cker For This Useful Post:

    Blubb1337 (03-11-2010),Obama (03-11-2010)

  14. #9
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by Unkn0wn_h4cker View Post
    Here =)

    Code:
    Private Declare Sub Sleep Lib "kernel32" _
     (ByVal dwMilliseconds As Long)
    
    Public Sub Wait(Seconds As Single)
    
     Dim lMilliSeconds As Long
     lMilliSeconds = Seconds * 1000
     Sleep lMilliSeconds
    
    End Sub
    or

    Use Call Delay(integer)

    Code:
    Sub Delay(dblSecs As Double)
    Const OneSec As Double = 1# / (1440# * 60#)
    Dim dblWaitTil As Date
    
    dblWaitTil = Now + OneSec * dblSecs
    Do Until Now > dblWaitTil
    DoEvents ' Allow windows messages to be processed
    Loop
    Yay, Someone else who can use Google


     


     


     



    The Most complete application MPGH will ever offer - 68%




  15. #10
    Unkn0wn_h4cker's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    38
    Reputation
    10
    Thanks
    17
    Yup,suits the cause ^.^ I normally make a simple pause code and make a sub for it and call it when I need it,but I couldn't be bothered typing

  16. The Following User Says Thank You to Unkn0wn_h4cker For This Useful Post:

    NextGen1 (03-11-2010)

  17. #11
    Matrix10's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    3
    My Mood
    Fine
    Hey on mine

    system.threading.thread.sleep(1000) works

    and

    threading.thread.sleep(1000) work but

    these don't work

    system.threading.thread.pause(1000)

    or

    threading.thread.pause(1000)

  18. #12
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    it may be system.threading.thread.suspend

    I'm going by memory, I don't use them often


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. [Help Request] Help me to solve this ? :#
    By josias008 in forum Combat Arms Help
    Replies: 9
    Last Post: 08-06-2011, 12:05 AM
  2. [Help]Thread.Sleep alternative[Solved]
    By l4sth4ck3r in forum Visual Basic Programming
    Replies: 21
    Last Post: 03-25-2010, 08:30 PM
  3. [Help]ComboBox Selections[Solved]
    By ppl2pass in forum Visual Basic Programming
    Replies: 5
    Last Post: 03-15-2010, 02:29 PM
  4. [Help] Missing Tabs [Solved]
    By zmansquared in forum Visual Basic Programming
    Replies: 18
    Last Post: 03-11-2010, 06:25 PM
  5. [Help]Custom GUI[Solved]
    By martijno0o0 in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-07-2010, 06:43 AM