|
-
Feb 16th, 2003, 07:47 PM
#1
Thread Starter
New Member
Is this code right
I'm trying to create a prog. which allows a user to enter username and password within 20 seconds. if username/password is not entered within the time allowed prog should terminate, as well as if pwd/ username not entered corrrectly a message shold pop up. Can some one look at this code and tell me where i'm going wrong.
thank you.
Private Sub grp1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grp1.Enter
Dim Username As String = New String("mark")
Dim Password As String = New String("pass")
Dim intCount As Integer = New Integer()
End Sub
Private Sub txtUser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUser.TextChanged
If (txtUser.Text) = "mark" And _
(txtPass.Text) = "Pass" Then
MsgBox("Logged in...", MsgBoxStyle.Information, "Logged in...")
Else
If Not (txtUser.Text) = "mark" Then
MsgBox("worng username", MsgBoxStyle.Critical + MsgBoxStyle.OKOnly, "Auth")
Exit Sub
Else
If Not (txtPass.Text) = "pass" Then
MsgBox("wrong password", MsgBoxStyle.Critical + MsgBoxStyle.OKOnly, "Auth.")
End If
End If
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|