You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

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
splashForm.Invoke(Sub() splashForm.Close())
splashForm.Dispose()
splashForm = Nothing
End Sub
End Module