• Welcome to ForumKorner!
    Join today and become a part of the community.

Login & Register System [VB]

Poppy

Member
Reputation
0
Login + Register System by Poppy
First go to My Project and add these settings
lcAh0Ix.png

on the login page you will need
2 labels
2 textboxes
1 link label
1 button
1 checkbox
03c05742bccdbc3ae4909a0b4e48a504.png

Code:
Public Class Login
   Private Sub TabPage1_Click(sender As Object, e As EventArgs)
   End Sub
   Private Sub FormSkin1_Click(sender As Object, e As EventArgs)
   End Sub
   Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
       Register.Show()
       Me.Close()
   End Sub
   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       If TextBox1.Text = My.Settings.Username AndAlso TextBox2.Text = My.Settings.Password Then
           If CheckBox1.Checked = True AndAlso TextBox1.Text = My.Settings.Username AndAlso TextBox2.Text = My.Settings.Password Then
               My.Settings.Save()
               My.Settings.Remember = True
           End If
           MessageBox.Show("Welcome: " + My.Settings.Username)
           Program.Show()
           Me.Close()
       Else
           MessageBox.Show("Wrong Login Information")
           TextBox2.Text = ""
       End If
   End Sub
   Private Sub Login_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       If My.Settings.Remember = True Then
           TextBox1.Text = My.Settings.Username
           TextBox2.Text = My.Settings.Password
       Else
           TextBox1.Text = ""
           TextBox2.Text = ""
       End If
       TextBox2.UseSystemPasswordChar = True
   End Sub
End Class
Register System
3 textboxes
3 labels
1 button
1 timer
gYRtYJ0.png

Code:
Public Class Register
   Private Sub Register_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       Button1.Visible = False
       TextBox2.UseSystemPasswordChar = True
       TextBox3.UseSystemPasswordChar = True
       Timer1.Enabled = True
   End Sub
   Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
       If TextBox1.Text.Length >= 1 AndAlso TextBox2.Text.Length >= 1 AndAlso TextBox3.Text.Length >= 1 Then
           Button1.Visible = True
       Else
           Button1.Visible = False
       End If
   End Sub
   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       If TextBox2.Text = TextBox3.Text Then
           My.Settings.Username = TextBox1.Text
           My.Settings.Password = TextBox2.Text
           My.Settings.Save()
           MessageBox.Show("Registration Complete")
           Login.Show()
           Me.Close()
       Else
           MessageBox.Show("Passwords Do Not Match")
           TextBox2.Text = ""
           TextBox3.Text = ""
       End If
   End Sub
End Class
Example Download - https://www.dropbox.com/s/6ogq9v39ywudw5v/Login + Register System.exe?dl=0
Virus Total - https://www.virustotal.com/en/file/...4c40526b57e1fc938d706539/analysis/1420603304/
 

sdk

User is banned.
Reputation
0
Not bad you should expand this into a web login so you can interact with databases :)
 

Odus

User is banned.
Reputation
0
.Fusion said:
Not bad you should expand this into a web login so you can interact with databases :)

He's using My.Settings and you're recommending server side?
 

sdk

User is banned.
Reputation
0
Odus said:
He's using My.Settings and you're recommending server side?

Yes, he should ditch My.Settings and turn it into a web login. Like I said. Seeing as a web login is a better way to do this and more used.
 
Top