Results 1 to 15 of 15

Thread: [RESOLVED] Splash screen

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Resolved [RESOLVED] Splash screen

    I have a splash screen and i am wanting a moving timer on it so when i play the program it will display "Program is loading" and then " . . . . . . ."
    THis is something i have never tried before and hope you could help!!!

    many thanks for helping

  2. #2
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Splash screen

    Code:
    Private Sub Form_Load()
    
       Timer1.Enabled = True
       Timer1.Interval = 1000  '//This will regulate the speed of events
       Timer1.Tag = "-1"
    
    End Sub
    
    Private Sub Timer1_Timer()
    
       Dim i As Integer
    
       Timer1.Tag = Val(Timer1.Tag) + 1
    
       If Timer1.Tag = "0" Then
           Label1.Caption = "Program is loading"
           Exit Sub
       End If
    
       i = Val(Timer1.Tag)
       If i < 8 Then
          Label1.Caption = Label1.Caption & "."
       Else
          MAINFORM.Show
          Unload Me
       End If
    
    End Sub
    Last edited by TheBigB; Mar 3rd, 2007 at 06:39 PM.
    Delete it. They just clutter threads anyway.

  3. #3
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: Splash screen

    This is my final class project...VB6-1.
    Uses timer with fonts becoming bigger.
    Mult form, Global statments, and lots of comments
    Attached Files Attached Files

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Re: Splash screen

    Thanks sessi4ml it works like a beuty on my main screen the timer and exit button well thought out. On the other hand TheBigB, it doesnt work, it displays in a label Program loading but not the .... and it doesnt hide my splash and unload mainmenu.

    Hope you can help!!???
    Thanks

  5. #5
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Splash screen

    Oh you're right, I see
    Changed it; should work now
    Delete it. They just clutter threads anyway.

  6. #6

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Resolved Re: Splash screen

    Could You Please Inlighten Me Into What They New Code Is Perhaps Lol!!!
    Many Thanks

  7. #7
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Splash screen

    Code:
    Timer1.Tag = Val(Timer1.Tag) + 1
    forgot to increase the number
    Delete it. They just clutter threads anyway.

  8. #8

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Re: Splash screen

    i cant fathem out where its to go into the code, could you give me the whole code please as i need it asap.
    many thanks for all your help!!!!

  9. #9

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Re: Splash screen

    Does the code look like this now-

    Private Sub Form_Load()

    Timer1.Enabled = True
    Timer1.Interval = 1000 '//This will regulate the speed of events
    Timer1.Tag = Val(Timer1.Tag) + 1

    End Sub

    Private Sub Timer1_Timer()

    Dim i As Integer

    Timer1.Tag = Val(Timer1.Tag) + 1

    If Timer1.Tag = "0" Then
    Label1.Caption = "Program is loading"
    Exit Sub
    End If

    i = Val(Timer1.Tag)
    If i < 8 Then
    Label1.Caption = Label1.Caption & "."
    Else
    MAINFORM.Show
    Unload Me
    End If

    End Sub

  10. #10
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Splash screen

    Code:
    Private Sub Form_Load()
    
        Timer1.Enabled = True
        Timer1.Interval = 1000 '//This will regulate the speed of events
        Timer1.Tag = -1
    
    End Sub
    
    Private Sub Timer1_Timer()
        
        Dim i As Integer
        
        Timer1.Tag = Val(Timer1.Tag) + 1
        
        If Timer1.Tag = "0" Then
            Label1.Caption = "Program is loading"
            Exit Sub
        End If
        
        i = Val(Timer1.Tag)
        If i < 8 Then
            Label1.Caption = Label1.Caption & "."
        Else
            Timer1.Enabled = False
            MAINFORM.Show
            Unload Me
        End If
    
    End Sub
    Delete it. They just clutter threads anyway.

  11. #11

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Re: Splash screen

    Right i have managed to sort the forms out but the program is now saying "......" and not program is loading and then ...... ?!?!?!??!
    Dont surpose anyone could help.
    My code is below-

    Private Sub Timer1_Timer()

    Dim i As Integer

    Timer1.Tag = Val(Timer1.Tag) + 1

    If Timer1.Tag = "0" Then
    Label2.Caption = "Program is loading"
    Exit Sub
    End If

    i = Val(Timer1.Tag)
    If i < 8 Then
    Label2.Caption = Label2.Caption & "."
    Else
    frmMainmenu.Show
    Unload Me
    End If


    End Sub

  12. #12

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Re: Splash screen

    I have just sorted it out!!!!ITS SIMPLY AMAZING!!!! THEBIGB is a complete LEGEND and a credit to the site. MANY THANKS GUYS!!!!!!!

  13. #13
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Splash screen

    have you put
    Timer1.Tag = -1
    in the form's load sub?
    Delete it. They just clutter threads anyway.

  14. #14

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    43

    Resolved Re: Splash screen

    yeah i have it in the form load sector.
    Many thanks for all your help!!!!!

  15. #15
    Addicted Member
    Join Date
    Jun 2006
    Location
    Egypt
    Posts
    162

    Cool Re: Splash screen

    Try my own heck

    Not exactly what you want but it is a cool idea
    Attached Files Attached Files
    Mohammed Sayed - Egypt - Anesthetist



    =

    =

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