Update 6.12.23
This commit is contained in:
@@ -1,45 +1,45 @@
|
||||
Imports System.Threading
|
||||
|
||||
Module Program
|
||||
|
||||
|
||||
|
||||
Public splashForm As SplashForm = Nothing
|
||||
|
||||
|
||||
|
||||
Public Sub Main()
|
||||
Application.EnableVisualStyles()
|
||||
Application.SetCompatibleTextRenderingDefault(False)
|
||||
Dim mainForm As Form = New frmMain
|
||||
AddHandler mainForm.Load, AddressOf mainForm_Load
|
||||
|
||||
Dim splashThread As New Thread(New ThreadStart(Sub()
|
||||
splashForm = New SplashForm()
|
||||
Application.Run(splashForm)
|
||||
End Sub))
|
||||
splashThread.SetApartmentState(ApartmentState.STA)
|
||||
'splashThread.Start()
|
||||
|
||||
Application.Run(mainForm)
|
||||
mainForm.BringToFront()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub mainForm_Load(sender As Object, e As EventArgs)
|
||||
If splashForm Is Nothing Then
|
||||
Return
|
||||
End If
|
||||
Try
|
||||
splashForm.Invoke(Sub() splashForm.Close())
|
||||
Catch
|
||||
End Try
|
||||
|
||||
splashForm.Dispose()
|
||||
splashForm = Nothing
|
||||
End Sub
|
||||
End Module
|
||||
Imports System.Threading
|
||||
|
||||
Module Program
|
||||
|
||||
|
||||
|
||||
Public splashForm As SplashForm = Nothing
|
||||
|
||||
|
||||
|
||||
Public Sub Main()
|
||||
Application.EnableVisualStyles()
|
||||
Application.SetCompatibleTextRenderingDefault(False)
|
||||
Dim mainForm As Form = New frmMain
|
||||
AddHandler mainForm.Load, AddressOf mainForm_Load
|
||||
|
||||
Dim splashThread As New Thread(New ThreadStart(Sub()
|
||||
splashForm = New SplashForm()
|
||||
Application.Run(splashForm)
|
||||
End Sub))
|
||||
splashThread.SetApartmentState(ApartmentState.STA)
|
||||
splashThread.Start()
|
||||
|
||||
Application.Run(mainForm)
|
||||
mainForm.BringToFront()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub mainForm_Load(sender As Object, e As EventArgs)
|
||||
If splashForm Is Nothing Then
|
||||
Return
|
||||
End If
|
||||
Try
|
||||
splashForm.Invoke(Sub() splashForm.Close())
|
||||
Catch
|
||||
End Try
|
||||
|
||||
splashForm.Dispose()
|
||||
splashForm = Nothing
|
||||
End Sub
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user