📄 form1.vb
字号:
Public Class Form1
Public Shared Sub Main()
Dim spFrm As SplashForm = New SplashForm()
spFrm.Show()
spFrm.Refresh()
Dim frm1 As Form1 = New Form1(spFrm)
Application.Run(frm1)
End Sub
Private splash As Form
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
Me.Close()
End Sub
Public Sub New(ByVal splashScreen As Form)
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
splash = splashScreen
' Simulate a long-running construction
System.Threading.Thread.Sleep(5000)
End Sub
Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
If Not splash Is Nothing Then
' Close the splashscreen
splash.Close()
splash.Dispose()
splash = Nothing
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -