Login Form in Visual Basic

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Login Form in Visual Basic 6.

Private Sub Command1_Click()


If Text1.Text = "Admin" And Text2.Text = "admin123" Then
Form1.Hide
Form3.Show
Else
MsgBox "Wrong User id or Password", , "Error"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub

Private Sub
Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 1
Label1.Caption = "Loading......"
Label2.Caption = ProgressBar1.Value & "%"
If ProgressBar1.Value = 100 Then
Timer1.Enabled = False
Form3.Hide
Form2.Show
End If
End Sub
Private Sub Form_Load()
Timer1.Interval = 100
End Sub

Private Sub Timer1_Timer()


Label1.ForeColor = QBColor(Rnd * 15)
End Sub
Private Sub Form_Load()
Timer1.Interval = 300
End Sub

You might also like