Splash Screen and MDI Forms

Smallville

Member
Joined
Jul 7, 2005
Messages
7
Programming Experience
1-3
Hi,

I have created a new VB .Net Applictaion with a Spalsh screen as the start up form and an MDI form.

When the user clicks on the splash screen, I want to unload the splash screen and load the MDI form.

VB.NET:
 dim Main as New Main 
Main.show()
 
Me.Close()

However, this does not work in VB .Net. The whole application stops without loading the MDI Form.

Does anyone have an idea why this is so? Does anyone know how this can de done (close splash screen and load MDI form)?

Thank you for your help,
Regards
 
Last edited:
Hello Smallville and welcome to the forum :).

In Framework V1 if you set the 'Startup Object' to a form, closing that form will end the application. In Framework V2 you can specify how the application should end; when the startup form closes or when all forms close.

There are several ways to create a splash screen depending on your specific circumstances. I'll include several links to different circumstances:
Using a splash sreen as both a Splash screen and an About dialog
Splash screen used as a password form
Standard Splash Screen & Splash Screen that waits for app to load
 
Close Splash Screen

This is the code you need but however it's better if you take a look at attached project ... there is something that i cannot describe here ...
VB.NET:
Private Sub Splash_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click
 
Timer1.Dispose()
Dim frm2 As New Form1
 
frm2.Show()
 
Me.Close()
 
End Sub

Cheers ;)
 

Attachments

  • SplashScreen.zip
    39 KB · Views: 64
Thanks to both of you, both solution works. Since I am new to VB .Net, can you please tell me then, if I apply the solution provided by Kulrom, will I be able to deploy my application without any impact?
 
Back
Top