Results 1 to 4 of 4

Thread: Adding a delay to a splash screen

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    N.Ireland
    Posts
    7
    Hi, Just an elementary problem.
    How do you add a delay to a splash screen to allow it to be displayed for a sufficient time.

    Cheers

  2. #2
    Guest
    This is API's Sleep Sub.

    Code:
    Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)   
    
    'This will delay the program for 1 second:
    Call Sleep(1000)
    Don't mind the 1000, the 0's space, just put it back when you paste the code into your VB Project.

  3. #3
    Fanatic Member spud's Avatar
    Join Date
    Aug 2000
    Location
    Munster (Germany)
    Posts
    542
    I'm just new at VB5 and I did it with this:


    Private Sub Timer1_Timer()
    Static Progress As Integer
    Progress = (Progress + 1) Mod 10
    ProgressBar1.value = Progress
    If ProgressBar1.value = 9 Then
    frmMain.Show 'count finished
    Unload Me
    End If
    End Sub

    I had the Timer Interval set to 100

    Hope this helps, there is no doubt an easier way to do it but I'm just new at it.

    Spud

  4. #4
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523
    Or use timer
    Code:
    '//Add a two forms, add a timer to Form1 (Interval 5000 ms = 5 sec)
    Private Sub Timer1_Timer()
        Form2.Show
        Unload Form1
    End Sub
    Post #514

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