|
-
Jun 3rd, 2010, 03:59 AM
#1
Thread Starter
New Member
Need Help With A Log In System!
I am doing a log in system and everything works fine except whether you get the password correct or not as long as the username is right it logs in. Can someone help and tell me what I should change on the codes for this login button?
Thanks,
If My.Computer.FileSystem.DirectoryExists(" C:\ACCOUNTS" + TextBox1.Text + "\") Then
Dim USERREAD As System.IO.StreamReader = New System.IO.StreamReader("C:\ACCOUNTS" + TextBox1.Text + "\" + "USERNAME.TXT")
Dim userline As String
Dim PASSREAD As System.IO.StreamReader = New System.IO.StreamReader("C:\ACCOUNTS" + TextBox1.Text + "\" + "PASSWORD.TXT")
Dim passline As String
Do
passline = TextBox2.Text
userline = USERREAD.ReadLine
Console.WriteLine(passline)
Console.WriteLine(userline)
Loop Until userline Is Nothing
Form2.ShowDialog()
Me.Close()
If TextBox2.Text = "" Then
MsgBox("Please input both username and password to login", MsgBoxStyle.Critical)
Else
If passline = PASSREAD.ReadLine() = True Then
End If
End If
Else
MsgBox("The username or password was incorrect. please try again.", MsgBoxStyle.Critical)
End If
End Sub
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
-
Jun 3rd, 2010, 05:39 AM
#2
Re: Need Help With A Log In System!
Follow the CodeBank link in my signature and check out my WinForms Login thread.
Tags for this Thread
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
|