Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '[VB .NET] Login and Register Code
- 'Made by Suddendox https://www.youtube.com/channel/UCjNerdkHqrHYwhQ37TZCllA
- 'https://selly.gg/@Doxx
- 'https://selly.gg/p/c8fb0574
- Public Class Form1
- 'https://selly.gg/p/c8fb0574
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- 'Login Button
- If TextBox1.Text = "" Or TextBox2.Text = "" Then
- MsgBox("Cannot be blank!") 'https://selly.gg/p/c8fb0574
- Else
- If TextBox1.Text = My.Settings.username And
- TextBox2.Text = My.Settings.password Then
- 'Login successfully 'https://selly.gg/p/c8fb0574
- MsgBox("Welcome, " + TextBox1.Text)
- Else
- MsgBox("Invalid username and/or password.")
- End If
- End If
- End Sub
- 'https://selly.gg/p/c8fb0574
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- 'Register Button
- If My.Settings.username = "" Or My.Settings.password = "" Then
- My.Settings.username = TextBox1.Text.ToString()
- My.Settings.password = TextBox2.Text.ToString()
- My.Settings.Save()
- MsgBox("Account Created!")
- Else
- MsgBox("You have already created an account.") 'https://selly.gg/p/c8fb0574
- End If
- End Sub
- 'https://selly.gg/p/c8fb0574
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- If My.Settings.username = "" Or My.Settings.password = "" Then
- Button2.Visible = True
- Else
- 'If they have already created an account, then hide the register button.
- Button2.Visible = False
- End If
- End Sub
- End Class
- 'https://selly.gg/p/c8fb0574
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement