VB Splash Screen?
-
I'm trying to make a splash screen where the program opens with frmOpen, and the form stays up for 5 seconds, and then frmMain should open. I know, it's probably silly, but I'm a total newbie in VB :) Thanks, kobi
go to project explorer window..right click on your project name->add->form->choose a splash form... vb has a inbuilt splash form... then set yourpoject properties startup object as frmSplash that u just added.. as for the five seconds add a times set it to 5 seconds(which i think is a bit too long) and on the routine of time unload the splash form and load your first form Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40
-
go to project explorer window..right click on your project name->add->form->choose a splash form... vb has a inbuilt splash form... then set yourpoject properties startup object as frmSplash that u just added.. as for the five seconds add a times set it to 5 seconds(which i think is a bit too long) and on the routine of time unload the splash form and load your first form Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40
I must be doing something very wrong, but I don't see any reference to splash screen in the new items I can add in the VB project. There are lots of forms, source files, scripts, and other stuff, but no splash screen. What I need is help withthe timer control.. how to code a " hold the form1 open for X seconds and then close form1 and open form2" thanks, Kobi.
-
I must be doing something very wrong, but I don't see any reference to splash screen in the new items I can add in the VB project. There are lots of forms, source files, scripts, and other stuff, but no splash screen. What I need is help withthe timer control.. how to code a " hold the form1 open for X seconds and then close form1 and open form2" thanks, Kobi.
Hold the current thread for a while.. Thread.CurrentThread.Sleep(5000) This code waits for 5 seconds... Free your mind...
-
Hold the current thread for a while.. Thread.CurrentThread.Sleep(5000) This code waits for 5 seconds... Free your mind...
-
does it allow for any action to be performed on the form during those 5 seconds? like clicking? thx.
Do you wanna build splash screen ?, if so, why you wanna performs clicks on the form ? Give it a try man, it won't take more than 5 minutes. Free your mind...
-
Do you wanna build splash screen ?, if so, why you wanna performs clicks on the form ? Give it a try man, it won't take more than 5 minutes. Free your mind...
I wish it was that simple.. I need to put an easter egg in the opening form. I have a "about" button there, and I have a timer control set to 5000, with a ME.Close() code in the timer_elapsed(..) function, but I don't know how to open the next form I want to be opened.
-
I wish it was that simple.. I need to put an easter egg in the opening form. I have a "about" button there, and I have a timer control set to 5000, with a ME.Close() code in the timer_elapsed(..) function, but I don't know how to open the next form I want to be opened.
i wouldn't suggest putting th emain thread to sleep.... cause when u show the splash screen the user must have the opetion to click the splash screen to make it go away..so i suggest using a timer and then on click put unload form for splash screen...are u able to add it yet? Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40
-
i wouldn't suggest putting th emain thread to sleep.... cause when u show the splash screen the user must have the opetion to click the splash screen to make it go away..so i suggest using a timer and then on click put unload form for splash screen...are u able to add it yet? Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40
-
I go the main form to close, using a timer, but I don't know how to make a different form open after the "splash" screen closes.
OK. Your main form is NOT your splash screen. What you do in your main form is this: (From memory...so there may be some mistakes...)
Private Sub Form_Load()
Dim SplashScreen As New Form2SplashScreen.Show()
End Sub
Now, Form2 is your splash screen. It has the timer on it and enables the 5 second countdown in it's Form_Activate or Form_Load event. When the timer expires, in it's event, just close the form:
Private Sub Form_Activate()
Timer1.Interval = 5000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Me.Close
End SubDuring the 5 second countdown, your Splash screen is able to respond to events just like any other form. RageInTheMachine9532
-
I go the main form to close, using a timer, but I don't know how to make a different form open after the "splash" screen closes.