how would i go about making a preload form that displays a loading bar and then loads the main mdi form after its finished...? here is an example
http://img236.imageshack.us/img236/9...example1tf.jpg
Printable View
how would i go about making a preload form that displays a loading bar and then loads the main mdi form after its finished...? here is an example
http://img236.imageshack.us/img236/9...example1tf.jpg
use splash screen form and a timer and a progress bar
I have attached a working copy. I hope this will help you and if you receive an answer to your question do take time to rate this post. :wave: :thumb:
EDIT: I uploaded a working copy now.
i get a bunch of errors when i try to load the project... when i open the prject file it says it cant find the form..
Edit:
never mind i got it to work but...
1) how do I add a progress bar (which component?)
2) how would i load the progress bar on the progress of the actual program loading rather than just a timer?
1. Use the component (Project -> Components), 'Microsoft Window Common Controls 5.0 (SP2)'Quote:
Originally Posted by Prophet-
2. I don't really get what you're trying to ask , but you can use the Progressbar with the timer and setup steps of each load like this:
VB Code:
'add a timer named: Timer1 'add a progressbar named: ProgressBar1 Private Sub Form_Load() Timer1.Enabled = True Timer1.Interval = 500 '1/2 of a second ProgressBar1.Value = 0 Me.Caption = "Loading..." End Sub ' Private Sub Timer1_Timer() Dim num As Long Select Case num& Case 0 ProgressBar1.Value = ProgressBar1.Value + 10 'load some stuff Case 1 ProgressBar1.Value = ProgressBar1.Value + 10 'load some stuff Case 2 ProgressBar1.Value = ProgressBar1.Value + 10 '...etc, etc Case 3 'last case , unload, goto mdi form Unload Me MDIForm1.Show End Select num& = num& + 1 End Sub
This is one way , of course theres other ways (some) much more sophisticated.
the very simple example would be New Project->VB Application Wizard->Multiple Document Interface and Include Splash Screen at application startup when prompted...
that splash screen will be stayed only during the loading process without the timer...
As far as the progress bar is concerned you have to include the coding to increase the value of it till your project gets fully loaded...ie. your main form's loading time...
error loading project ... :(Quote:
Originally Posted by Simply Me
Quote:
Originally Posted by rory
Checked my previous attachment. Its now working. thanks for pointing that out rory.