如何为 VB.net 程序创建启动画面

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6406522/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 15:34:03  来源:igfitidea点击:

How to create a Splash screen for VB.net program

vb.netvisual-studiovisual-studio-2010splash-screen

提问by Kuzon

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 starts and after it finishes in this possible?

如何为 vb.net 程序创建启动画面?我想制作一个在程序启动之前和完成之后出现的视觉效果,这可能吗?

采纳答案by msarchet

http://msdn.microsoft.com/en-us/library/bfkbc5a3(v=VS.100).aspx

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.

基本上,您可以在 Visual Studio 的程序属性中设置要用作启动画面的表单。很简单。

回答by audie

  1. Open Your vb.net
  2. Add new project
  3. Go to properties of your form
  4. Clear the Text
  5. Set the FormBorderStyleto None.
  6. Insert a background image.
  7. Set the background image to stretch.
  8. Add a ProgressBar, a Timerand a Labelto your form.
  9. Go to properties of timer set the Intervalinto 50and Enabledto 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. Incrementwhich mean to increase by 1.
  13. form2.showto show an another form if the ProgressBarwas done processing.
  14. In a Label you must rename it whatever you want.
  1. 打开你的 vb.net
  2. 添加新项目
  3. 转到表单的属性
  4. 清除文本
  5. FormBorderStyle设置为 None。
  6. 插入背景图像。
  7. 将背景图像设置为拉伸。
  8. 向表单添加ProgressBarTimerLabel
  9. 转到计时器的属性,将Interval设置为50并将Enabled 设置true
  10. 双击计时器事件。
  11. 在私有子 Timer_Tick 中填充此代码;

     ProgressBar1.Increment(1)
           If ProgressBar1.value = 100 Then
                  Me.hide() 
                  form2.Show()
           End IF
    
  12. Increment表示增加 1。
  13. 如果ProgressBar已完成处理,则form2.show显示另一个表单。
  14. 在标签中,您必须根据需要对其进行重命名。

回答by Guppy Platy

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