Public Class introScreen Dim ResourceFilePathPrefix As String Private Sub introScreen_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load If System.Diagnostics.Debugger.IsAttached() Then 'Debugging ResourceFilePathPrefix = System.IO.Path.GetFullPath(Application.StartupPath & "\..\..\resources\") Else 'Published ResourceFilePathPrefix = Application.StartupPath & "\resources\" End If 'Presume you have added calc.exe file to Resources Process.Start(ResourceFilePathPrefix & "msat.mp3") End Sub Private timer1 As New Timer Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. timer1.Interval = 5000 timer1.Enabled = True AddHandler timer1.Tick, AddressOf Timer1_Tick End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) 'Open login form and close initial screen Dim f2 As New loginForm f2.Show() timer1.Enabled = False Me.Hide() End Sub End Class
Control
System.Windows.Forms.Control.Focus
System.Windows.Forms.Form.BringToFront
System.Windows.Forms.Form.Activate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)