splash screen/startup screen [button] help...

vinyl409

Member
Joined
Mar 16, 2005
Messages
6
Programming Experience
Beginner
hey everyone...

i'm new around here. glad to be apart of the forums. i'm a beginner to VB.net, and programming in general, so bear with me :). however, i am motivated the learn the programming essentials, as i find it all very interesting.

i'm currently working on a program which i am required to have a 'splash screen', or a 'startup screen' to display information about my program, and have a 'start' button to display the main form.

i already have the splash screen working correctly [i think], when i run the program it appears first. however, i am unsure of what code to put in the 'start' button. i thought it would simply just be 'Me.Close' or 'Me.Hide', but when I tried that, it just shuts down the whole program.

any help would be greatly appreciated. thank you all for your responses in advance.

i look forward to an enlightning learning experience here on the VB.net forums!


P.S. I posted this thread in the VS.net part of the forums as well, I wasn't sure which forum would be more appropriate for this question. Sorry if this causes any problems.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
i would actually add a module to the application and make a Sub Main (set this as the startup object) then within the Sub Main include these things:

a variable for the splash screen/form (dim SplashScreen as new frmsplashscreen)
a variable for the main form

then use:
Application.Run(SplashScreen)
Applicarion.Run(MainForm)
End Sub
 

whatever

New member
Joined
Feb 26, 2008
Messages
1
Programming Experience
Beginner
I'm very sorry... I also a beginner(Noob) in using VB.Net. I still not understand how to type the code.

I made my code as below but many errors appear:
...................................................................
Public NotInheritable Class SplashScreen1

End Class

Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim SplashScreen As SplashScreen1
Dim MainForm As Form1

Application.Run(SplashScreen)
Application.Run(MainForm)

End Sub
...................................................................
:confused::confused::confused:
Anyone can help?
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,438
Location
Norway
Programming Experience
10+
whatever, you're using .Net 2.0 and it got splash functionality built in, just add a new "Splash Screen" from form templates to your project, then choose it in project properties for "Splash screen". Application.Run is normally not done in code from .Net 2.0 and up (and absolutely not in form Load ;)), the application framework manages this.
 
Top Bottom