-
1 Attachment(s)
Basic Login System
Here is a Quick tutorial on how to make a Login System...
HOW TO:
1) Create a project and name it whatever you want...
2) Create A Button and a Textbox...
3) View the code on your Button and put...
Code:
If Not TextBox1.Text = "VB6Learner" Then
MsgBox("Invalid Password")
End If
If TextBox1.Text = "VB6Learner" Then
LoggedIn.ShowDialog()
End If
4) Thats all!
This is very easy and can be done within a minute lol...
I thought I should just give this for all the beginners and all the people that might of just wanted to know how to do this! I added A little extra in the Logged in form nothing that special tho...
-
Re: Basic Login System
Why do you have two if statements? Logically you should use the else clause:
Code:
If TextBox1.Text = "VB6Learner" Then
LoggedIn.ShowDialog()
Else
MsgBox("Invalid Password")
End If
I also doubt anyone would actually hard code the password either. Usually PW's are stored in encrypted files or in a secure DB.
-
Re: Basic Login System
Ya I just wanted to basically tell about the If Code this is mainly for beginners so I thought they better learn the long way so they can understand it a bit better and hopefully learn your way to! :)