Results 1 to 8 of 8

Thread: How do I implement a "wait" in my code?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    2

    Post

    I do I implement eg. "wait for 1 second" then proceed through the code?

  2. #2
    Guest

    Post

    I'm not sure what's it's called but I think the Sleep Function would work. Same with a timer.

  3. #3
    Guest

    Post

    I think it's :

    sleep(1000) ' 1000 = 1 second.

    Knight

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    You can also put your program to "sleep" for any length of time using this API:

    Public Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)


    ------------------
    Marty

  5. #5
    Lively Member
    Join Date
    Oct 1999
    Posts
    101

    Post

    Hi Mudgen,

    In order to use the Sleep Function, you have to use both Martin and Knight_Vision's code together:

    Code:
    Option Explicit
    
    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    
    Private Sub Form_Load()
        Sleep (3000)
    End Sub
    All the best.

    Chris

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    2

    Post

    Hello ChrisJackson
    I am Writing for Windows NT.
    Is your code OK for this?

  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    I'll answer for him/her... Yes.

    ------------------
    Marty

  8. #8
    Lively Member
    Join Date
    Oct 1999
    Posts
    101

    Post

    Thanks Martin. You're right about the Sleep Function working with Windows NT. By the way, it's him.

    Chris

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