How to create a Splash screen for VB.net program
How do i create a Splash Screen for a vb.net program? I want to make a visual that will come up before the programs s开发者_运维问答tarts and after it finishes in this possible?
- Open Your vb.net
- Add new project
- Go to properties of your form
- Clear the Text
- Set the FormBorderStyle to None.
- Insert a background image.
- Set the background image to stretch.
- Add a ProgressBar, a Timer and a Label to your form.
- Go to properties of timer set the Interval into 50 and Enabled to true.
- Double click the Timer event.
Populate This Code Inside The Private Sub Timer_Tick;
ProgressBar1.Increment(1) If ProgressBar1.value = 100 Then Me.hide() form2.Show() End IF
- Increment which mean to increase by 1.
- form2.show to show an another form if the ProgressBar was done processing.
- In a Label you must rename it whatever you want.
http://msdn.microsoft.com/en-us/library/bfkbc5a3(v=VS.100).aspx
Basically you set the form that you want to use as a splash screen in the program properties in Visual Studio. Very simple.
improvement of other solution disable Timer before show other form
ProgressBar1.Increment(1)
If ProgressBar1.value = 100 Then
Me.hide()
Timer1.Enabled = False
form2.Show()
End IF
精彩评论