开发者

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?


  1. Open Your vb.net
  2. Add new project
  3. Go to properties of your form
  4. Clear the Text
  5. Set the FormBorderStyle to None.
  6. Insert a background image.
  7. Set the background image to stretch.
  8. Add a ProgressBar, a Timer and a Label to your form.
  9. Go to properties of timer set the Interval into 50 and Enabled to true.
  10. Double click the Timer event.
  11. Populate This Code Inside The Private Sub Timer_Tick;

     ProgressBar1.Increment(1)
           If ProgressBar1.value = 100 Then
                  Me.hide() 
                  form2.Show()
           End IF
    
  12. Increment which mean to increase by 1.
  13. form2.show to show an another form if the ProgressBar was done processing.
  14. 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜