Results 1 to 2 of 2

Thread: Splash Screen w/ Loading Bar

  1. #1

    Thread Starter
    Addicted Member spyk3's Avatar
    Join Date
    Apr 2009
    Location
    Dothan, AL
    Posts
    218

    Splash Screen w/ Loading Bar

    So i came across this old thread about this and decided i'd show an ezier way to do it.

    I made this quick splash screen with some borrowed code.
    I ddn't put alot of time in it so critisize away, lol, I don't kare, if you don't like how it's set up change it.

    On with the show:

    Download this splashscreen, add it to any application, change whatever settings you like except for the ones at the bottom (unless you know what you're doing with invoking)

    Then on your main form do one of two things:

    Possible Thing 1 -
    In Form Load use following code -
    autoPB1 Code:
    1. SplashScreen1.autoStepBar()
    or
    autoPB2 Code:
    1. SplashScreen1.autoStepBar(10) 'this is the number it will step, duh?

    OR
    Possible Thing 2
    In area where your form is doing alot of work on load -
    onLoad1 Code:
    1. Public Sub subDoingAlotOfWork()
    2.         Dim dictionary1 = New Dictionary(Of String, ArrayList)
    3.         Dim dictionary2 = New Dictionary(Of String, String)
    4.  
    5.         fillArrayList1()
    6.  
    7.         For Each item In ArrayList1
    8.             fillArrayList2(item)
    9.             dictionary1.Add(item, other)
    10.             SplashScreen1.stepBar() 'This steps it onetime here
    11.             For Each item2 In dictionary2
    12.                 fillOther2(someVariable)
    13.                 dictionary2.Add(item2, other2)
    14.                 SplashScreen1.stepBar() 'Then one more here
    15.             Next
    16.         Next
    17.  
    18.         'when done, stepping is done
    19.         'if u wanna change max size of proBar just change it on splash form
    20.         'or run another cross thread delegate if u wanna do it at real time
    21.     End Sub

    I know it's not beautiful, but shows really how ez it is to add a progress/LOADING bar without grabbing enumirators and switching timers on threads and all the other horrid stuff i've seen
    It's actually really simple and i've been adding loading bbars like this to a litl over 60 in house programs written in last year and not one has crashed or had problems yet. lol
    so enjoy,

    LAters,
    Attached Files Attached Files
    Last edited by Hack; Feb 17th, 2010 at 06:50 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Splash Screen w/ Loading Bar

    Moved To The CodeBank

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