1 Attachment(s)
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:
SplashScreen1.autoStepBar()
or
autoPB2 Code:
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:
Public Sub subDoingAlotOfWork()
Dim dictionary1 = New Dictionary(Of String, ArrayList)
Dim dictionary2 = New Dictionary(Of String, String)
fillArrayList1()
For Each item In ArrayList1
fillArrayList2(item)
dictionary1.Add(item, other)
SplashScreen1.stepBar() 'This steps it onetime here
For Each item2 In dictionary2
fillOther2(someVariable)
dictionary2.Add(item2, other2)
SplashScreen1.stepBar() 'Then one more here
Next
Next
'when done, stepping is done
'if u wanna change max size of proBar just change it on splash form
'or run another cross thread delegate if u wanna do it at real time
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,
Re: Splash Screen w/ Loading Bar