Advanced Login System
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
8 posts
Page 1 of 1
He guys
today i gonna show you guys how to make a advanced login system
whe need 3 forms
What whe need in form1 is
2 labels: label1 = username label2= password
2 textboxes: 1 is for username 2 for password
3 buttons: button1 = login button2 = create a user button 3 = exit
this is the hole code for form1:
2 labels: label 1 for username label 2for password
2 textboxes: 1 is for username 2 for password
1 button: Creates the user
the hole code for form2:
is just your one that is gonna show if your logd in
today i gonna show you guys how to make a advanced login system
whe need 3 forms
What whe need in form1 is
2 labels: label1 = username label2= password
2 textboxes: 1 is for username 2 for password
3 buttons: button1 = login button2 = create a user button 3 = exit
this is the hole code for form1:
Code: Select all
what whe need for form2 is:Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("ERROR,YOU NEED AT LEAST ONE LETTER", MsgBoxStyle.Critical)
Else
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
If TextBox2.Text = "" Then
MsgBox("error,PLEASE INPUT A PASSWORD", MsgBoxStyle.Critical)
Else
If PASSLINE = PASSREAD.ReadLine() = True Then
MsgBox("Youre Logd in " + TextBox1.Text)
Form3.show()
End If
End If
Else
MsgBox("THE USERNAME DONT EXIT", MsgBoxStyle.Critical)
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
2 labels: label 1 for username label 2for password
2 textboxes: 1 is for username 2 for password
1 button: Creates the user
the hole code for form2:
Code: Select all
And Form3 Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.DirectoryExists(" C:\ACCOUNTS\") = True Then
Else
End If
If TextBox1.Text = "" Then
MsgBox("ERROR,YOUR ACCOUNT MUST HAVE ONE LETTER IN IT", MsgBoxStyle.Critical)
Else
End If
If TextBox2.Text = "" Then
MsgBox("ERROR,PLEASE INSERT A PASSWORD", MsgBoxStyle.Critical)
Else
MkDir("C:\ACCOUNTS\" + TextBox1.Text)
Dim username As New System.IO.StreamWriter("C:\ACCOUNTS\" + TextBox1.Text + "\" + "username.txt")
username.Write(TextBox1.Text)
username.Close()
Dim password As New System.IO.StreamWriter("C:\ACCOUNTS\" + TextBox1.Text + "\" + "password.txt")
password.Write(TextBox2.Text)
password.Close()
MsgBox("ACCOUNT CREATED", MsgBoxStyle.Information, "ACCOUNT CREATED")
Me.Hide()
Form1.Show()
End If
End Sub
End Class
is just your one that is gonna show if your logd in
You do not have the required permissions to view the files attached to this post.
Hello,
Thats very good, MasterCoding ;) excellent!.
Keep up the good work cooll;
Thats very good, MasterCoding ;) excellent!.
Keep up the good work cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
You forgot to explain what this consists in so here's the explanation:
This Advanced Login System contains the very common Login stuff but also contains an example of a registration form which is very useful, with a login form you'll need a registration form for sure!
The first form (Form1) is the login form, where you enter your details to login with an existing account.
The Second form (Form2) is the register form, where you can create a new user for later use in the login form.
The Thrid form (Form3) is just the form that confirms if you're logged in or not (It's some kind of example)
This Advanced Login System contains the very common Login stuff but also contains an example of a registration form which is very useful, with a login form you'll need a registration form for sure!
The first form (Form1) is the login form, where you enter your details to login with an existing account.
The Second form (Form2) is the register form, where you can create a new user for later use in the login form.
The Thrid form (Form3) is just the form that confirms if you're logged in or not (It's some kind of example)
GoodGuy17 wrote:thanks do you mind if I use this in my vos?
You may use this always
Sometimes... you shouldn't trust those who put "hole" instead of "whole" multiple times... I don't blame you if you're forien though.
Thanks
8 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023