Hi
can anyone shed some light on how the splash screen works or the best way to use it..
I want the screen to appear for a set time, then disappear after somany seconds and then display my first form.
I've tried adding a sub procedure attached to form1 to call the splashscreen and then the form1 after so many seconds( using a timer variable.)
I don't seem t be getting anywhere.
Am I going about it the wrong way
Any help would be much appreciated
thanks
lee

Using a Splash Screen??
Scott Snyder
You can try this code, from what I've read it does what you want it to do (display your splashscreen and then opens form1).
Private
Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.Hide() Dim t As DateTime = Now.AddSeconds(5) ' Do : Application.DoEvents() My.Forms.splash.Show() Loop Until Now.Second >= t.Second My.Forms.splash.Close() Me.Show() End Subgs2006
hi
yes I have set this so the splash screen opens first, but then I need to clear it eventually and display my application(form1). Ideally I would like the splash screen to close and form 1 to appear after so many seconds, but haven't manged this yet. I have also tried adding a button to the splashscreen that opens form1, which works but it won't close the splash screen.
thanks lee
ooodi
wx
I'm not an expert on splash screens. But that code doesn't make a whole lot of sense to me.
You are looping with a doevents and a show splash screen.
I believe splash screen objects have more intelligence than this and if this is required it's to compensate for something else that is not implemented in the best way it can be.
Renee
js-mueller
Exactly what are you attempting to do
I understand that you want to change the time on the splash screen
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MinimumSplashScreenDisplayTime() As Integer
Setting that will change the splash screen time where the unit is milliseconds.
Eliminate the timer.
I think you bring the program up normally.
MattiasO
Thanks for that everyone, I have finally cracked it and got it going as I wanted...
Even the simplest things can be really hard when your a novice like me..(i'm slowly learning though)
thanks again
lee
com100h
sorry maybe didnt explain to well what i was trying to do..
basically add a splash screen to my project so when i run it a splash screen appears for a few seconds e.g 5 seconds then disappears to display the first form of my project.
I thought just adding a splash screen from the add windows form section would cover it, but obviously it doesn't. I suspect there must be an easy way to do it, otherwise i don't see the point of having a splash screen to add, it would be just as easy to create a new form and have that as a splash screen... wouldn't it
thanks
lee
ranganathanmca
Lee,
Did you go to Project | Properties
And set the splashscreen on the application tab
johnny wisconsin
To change the time the splashscreen is shown:
Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
'---- Override the OnInitialize function:
'
'---- Override Splashscreen timeout in Milliseconds
My.Application.MinimumSplashScreenDisplayTime = 2000
'
Return MyBase.OnInitialize(commandLineArgs)
End Function
Add this to the 'application events' module (select MyProject | Application | Application Events). Note that as you type protected overrides the IDE intellisense will show you the functions you have available).
When your startup form has finished loading, and is about to show, the splash screen form will go away (sorry, that's the best term for it), and the main form should load.
Golgot13
G'day Lee.
OK, I'm assuming that you have a project with a form. To this you want to add a Splash Screen that will display for a few seconds and then dissapear and leave your main form showing up on the screen.
First right click on the project name and select 'Add Item', then from the list select 'Splash Screen' and hit OK.
Next right click your project again and select 'Properties'. Select the 'Application' tab if it is not already open. Make sure that 'Startup Form' is set to your form1, or whatever you have called it, and then at the bottom of the screen set the 'Splash Screen' property to the name of your splash screen.
Now if you look at the 'Application' tab you should see an asterisk next to the word. That's a good thing, because it's telling you that your changes have been recognised....but....something needs changing.
Again, right click on the project name and this time select 'Build'. You should see a status window open and tell you that everything was ok.
Finally you can run your app and the Splash Screen will display for a couple of seconds then dissapear leaving your form open.
One thing I've not worked out yet is how to alter the length of time that the splash screen remains open for. Anyone got any ideas
Hope that helps you.
Graham.