Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "admin" And TextBox2.Text = "12345" Then Timer1.Start() Else If TextBox1.Text = "" And TextBox2.Text = "" Then MsgBox("No Username and/or Password Found!", MsgBoxStyle.Critical, "Error") Else If TextBox1.Text = "" Then MsgBox("No Username found!", MsgBoxStyle.Critical, "Error") Else If TextBox2.Text = "" Then MsgBox("No password found!", MsgBoxStyle.Critical, "Error") Else MsgBox("Invalid Username and/or Password Found!", MsgBoxStyle.Critical, "Error") End If End If End If End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Close() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ProgressBar1.Increment(2) If ProgressBar1.Value = ProgressBar1.Maximum Then Form2.Show() ' Me.Close() End If End Sub End Class