Hey,
Is it possible to add a progressbar to a splash screen, that automatically updates until the application is loaded?
Printable View
Hey,
Is it possible to add a progressbar to a splash screen, that automatically updates until the application is loaded?
When programming, there aren't really "automatic" features. Things don't just happen like end Users see. We're the ones who make those "automatic features.
Your program is obviously loading objects our performing tasks when it loads. So, you can add a progress bar to the Splash Screen form and the do something like the following in your main form:
vb Code:
'Commit task in Main Form SplashScreen1.ProgressBar1.Value += 1 'Commit task in Main Form SplashScreen1.ProgressBar1.Value += 1 'etc
You can set the Maximum property of the progress bar to the total of your tasks, or you can increase it's size by 1 right before you increase it's value by 1.
On your splash screen just set the progress bar style to marquee. That way you don't have to bother with increasing the value or anything like that (especially when the value you would be increasing by isn't any sort of real indication of your apps loading progress)
Why isn't it? Let's say the application loads after 10 tasks complete. After each task you increment it +1. So, when it hits 5, you know the application is halfway to loading and so on.
I think it's a better indication than a marquee bar, since the user will never have any idea on how much longer the app will take to load.
Well I don't know about you, but I hate progress bars. They are never accurate. What if steps 1 - 5 take 5 seconds each to complete, but steps 6-10 take 1 minute each to complete. You would get to 50% in 25 seconds, and think you have another 25 seconds before the rest is done, when in reality it is actually 5 more minutes.
The only time I find a progress bar to be of value is when each step takes the same amount of time to complete, or if somehow the amount of time can be closely estimated before hand in a way that you could give accurate measurements of progress.
Completing 5 of 10 steps might be considered 50% done, but it does not really measure actual progress in the sense that an end user would expect to see since they will base how long the second 50% should take on how long the first one took.
The other thing that kills me with progress bars is when they get to 100% yet the program still goes on crunching away for another 10 minutes with a full progress bar. :(
Well, I like to give the User an idea of how far the app has been loaded. While the progressbar, in this setup, won't accurately reflect how much time there is until it loads, it at least give them an idea.
A marquee progressbar leaves them in dark completely.
It's a sign of a thorough approach when a coder actually measures the times each step takes several times, averages it out and provide a user with more or less accurate info about the progress.
Well, we can always show him a spinning wheel or smth if we're not sure of how long does it take.
An ideal solution for a long waiting process is to entertain a user with some little game like tetris or arkanoid :D
Haha, it doesn't take that long to load that the user needs to play a game :P
I've got a problem with the splash screen tho, but I've psoted it in an other thread as this one's resolevd.