Results 1 to 12 of 12

Thread: Splash Screen [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2003
    Posts
    41

    Cool Splash Screen [Resolved]

    I am trying to add som finishing touches on my program
    I would like to add a splash screen that loads my main form
    my main form is rather large so I would also like to add a progress bar showing how far along the loading is what I have is

    Private Sub Form_Activate()
    DoEvents
    Load frmOrders
    End Sub

    How do I attach Progress bar?
    Last edited by wallacejww; Feb 16th, 2005 at 12:55 PM.

  2. #2
    Fanatic Member
    Join Date
    Jun 2003
    Location
    IL
    Posts
    739
    I don't think that is possible. You can't call the Load function and then find out how far along it is because there is no break in between the code. Once you make the call to Load you cannot stop it or ask for how far along it is, so there is no way to keep a progress bar on it.
    Motto: Anything for a laugh.

    Getting second place only means you are the first loser to cross the finish line.

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2003
    Posts
    41

    Unhappy

    Thats what I thought just checking thanks for your reply.

  4. #4
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    You can however do what i do, in a similiar case. Stick a timer on your form (obviously rename the following code to suit), and copy my splash screen code:

    VB Code:
    1. Private Sub tmrProgress_Timer()
    2. 'Initialize progress bar
    3. prgMain.Value = prgMain.Value + 1
    4.     If prgMain.Value = 25 Then
    5.         Load frmMain
    6.     ElseIf prgMain.Value = 99 Then
    7.         Unload Me
    8.         frmMain.Show
    9.     End If
    10. End Sub

    This wont show the TRUE progress, but it simulates the loading with a progressbar. Oh and set the Timer Interval to how fast you want the progress, i usually start with 100, then change to suit.

    Does this help?

  5. #5
    Fanatic Member
    Join Date
    Jun 2003
    Location
    IL
    Posts
    739
    You could do that just strictly for visual effects. But if you are on a faster computer the loading might get done before the timer completes the progress bar. Or the opposite where the timer completes the progress bar but the form is still loading. You are also in your logic slowing down the loading because you don't call to load the form until the progress is up 25%, which it did nothing during the time.
    Motto: Anything for a laugh.

    Getting second place only means you are the first loser to cross the finish line.

  6. #6
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Ill not go into this too much, dont want to spam this thread do we. Basically you will see and understand the logic around why i dont call frmMain until 25% when my app is complete. Which i will ensure ill let you know when its done. Im looking forward to completing this . If you would like to speak more, just email or make a thread in Chit Chat, we'll talk there.

    Anyway, back to this thread..........Imitating the progress isnt all that bad, i use it many of times, for the Visual effect if anything.

  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    You can display a progress bar while loading a form if there is code in the form that is executed while the form is loading. If that's the case just place statements like ProgressBar1.Value = 10, ProgressBar1.Value = 20, ProgressBar1.Value = 27 in various places (and with various values). It will work but it will take some experimentation to make it progress smoothly.

  8. #8
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Originally posted by MartinLiss
    If that's the case just place statements like ProgressBar1.Value = 10, ProgressBar1.Value = 20, ProgressBar1.Value = 27 in various places (and with various values). It will work but it will take some experimentation to make it progress smoothly.
    You probably know better than me anyway marty , but anyway. I though you use say ProgressBar1.Value + 10, ProgressBar1.Value + 20 etc, to add 10 in this case to the increment. Though im probably wrong. Besides im still learning how the Progressbar interacts and behaves.

  9. #9

  10. #10
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Thats good marty, you should of commented it though

  11. #11
    Addicted Member SandmanSamR's Avatar
    Join Date
    Dec 2003
    Location
    Florida
    Posts
    131
    heh, I didnt know there was more then the tools I was using.
    ';..;'
    Monsterous

    SANDMANSAMR
    SANDMANSAMR
    SANDMANSAMR
    SANDMANSAMR
    SANDMANSAMR

  12. #12
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Yeah mate, just go to Project > Components > BlahBlah.

    Then click ok after selecting your component, for the Progress bar etc, its called Microsoft Windows Common Controls 6.0 (SP4)

    And theres others, Dialog control > Microsoft Common Dialog Control 6.0

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