Load a form after another.

I have two forms. A splash Screen and a Main form.
I want the main form to load only after the splash screen.
I found out that they are both loading at the same time.
I'm using the splash screen as the first beeing shown.
I also have other forms that are Child of this main.
How do I do this?
Thank you!
figjusAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vinnyd79Commented:
add a timer on the splash screen and set the spash screen as the startup form.Then add this to the splash screen:

Private Sub Form_Load()
Timer1.Interval = 3000 ' 3 seconds
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
frmMain.Show
Unload Me
End Sub
0
figjusAuthor Commented:
Yes, I have that but the frmMain still loads at the same time.for instance if i have a msgbox on form load of my main it will show even before the splash screen. then splash loads and then main is visible. but it still loads first.
0
DeAnCommented:
is your splash form set as the startup form?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

vinnyd79Commented:
Right click on your Project File from the Project Explorer window.Then select Properties and make sure frmSplash is set as your Startup Object
0
figjusAuthor Commented:
yes it is. Startup object is my splash. this isn't supposed to happen... ugh?
0
figjusAuthor Commented:
I have another one set as child from this main and it doesn't load at the same time. actually I can't even load it!!! it's called: frmAbout
I'm using:
Load frmAbout
but it doesn't work... yeah i'm lame... :p
0
vinnyd79Commented:
Can you post the code from your splash form? Have you used frmAbout.Show?
0
DeAnCommented:
try frmAbout.Show
0
vinnyd79Commented:
Also make sure your timer interval isn't too low.
A value of 3000 will be about 3 seconds.
0
figjusAuthor Commented:
I've tried frmAbout.Show but it says :"no MDI form available to load". Still don't know why but msgbox keeps showing up. Here's my timer:

Private Sub Timer_Timer()
LoadingBar.Max = 50
If LoadingBar.Value <> 50 Then
   LoadingBar.Value = LoadingBar.Value + 1
Else
    Timer.Enabled = False
    frmMain.Visible = True
    Unload Me
End If
End Sub
0
DeAnCommented:
you need to add an MDIform as parent form... not regular form
0
vinnyd79Commented:
and try this for the splash screen. Make sure you set the timer's interval property.Try setting it at 100 and adjust as necessary.

Private Sub Form_Load()
LoadingBar.Min = 0
LoadingBar.Max = 50
LoadingBar.Value = 0
End Sub

Private Sub Timer_Timer()
If LoadingBar.Value < 50 Then
  LoadingBar.Value = LoadingBar.Value + 1
Else
   Timer.Enabled = False
   frmMain.Visible = True
   Unload Me
End If
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
figjusAuthor Commented:
Well all I want to do is: when user is on the other form he can't by all means select the main until he cancels the about. who do i give credit for this????
0
figjusAuthor Commented:
Thank you vinnyd79, I guess credit goes to you, but could you help me with this other problem? Thank You.
0
DeAnCommented:
I suggest making the about form NOT a child and set it as model:  frmAbout.Show 1

whatever you think for points, doesn't matter to me
0
figjusAuthor Commented:
DeAn I apreeciate that, it worked as I wanted. Anyway I'll give points to vinnyd79 because of the code he gave me. Sure more work.
Thank all anyway, Thanks really!
0
vinnyd79Commented:
I agree with DeAn. You might want to set frmAbout's StartUpPosition property to "CenterOwner" as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.