This is a simple login page.Create two form named form 1,form2 .Pplace two labels,two textbox ,1 timer and one progressbar . place the below code in the specified place and run your program .Give username as admin and password as password.
Steps
- Write the below code inside login button
Private Sub btnLogin_Click(sender As System.Object, e As System.EventArgs) Handles btnLogin.Click
If txtusername.Text = "admin" And txtpassword.Text = "password" Then
Timer1.Enabled = True
Else
MsgBox("please check username/password")
End If
End Sub
2. Write the below code in the timer
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
progressbar1.value += 10
If ProgressBar1.Value >= ProgressBar1.Maximum Then
Timer1.Enabled = False
' form2.showdialog()
End If
End Sub
After write the above codes run the program well.
0 comments:
Post a Comment