Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Simple Login Form Without A Database, Coded In VB.Net.
- 'Make Sure You Set The Shutdown Mode To "When Last Form Closes."
- 'Create All Buttons And Rename Main Form To "mainForm.vb" And This Form
- 'To "loginForm.vb" Before Putting This Code In Or You Will Get Errors!
- 'IMPORTANT: This Isn't "Secure" So People Can Still Bypass It, Use At Own Risk.
- '┏┓╋╋┏┓
- '┃┗┓┏┛┃
- '┗┓┃┃┏╋━━┳━━┓
- '╋┃┗┛┃┃┏┓┃┏┓┃
- '╋┗┓┏┛┃┗┛┃┃┃┃
- '╋╋┗┛╋┃┏━┻┛┗┛
- '╋╋╋╋╋┃┃
- '╋╋╋╋╋┗┛
- 'Login Form.
- Public Class loginForm
- Private Sub loginButton_Click(sender As Object, e As EventArgs) Handles loginButton.Click
- If UsernameBox.Text = "vpn" And PasswordBox.Text = "vpn" Then 'If Statement For Login. Change To Desired Login Information.
- MessageBox.Show("Thanks for logging in, vpn", "Success")
- My.Forms.mainForm.Show()
- My.Forms.loginForm.Close()
- ElseIf Attempts = 3 Then 'This Is For Setting Max Amount Of Attempts Before Application Is Closed.
- MessageBox.Show("You Have Reached The Maximum Number Of Allowed Attempts. Exiting The Application...", "Too Many Attempts")
- Application.Exit()
- Else 'This Happens If The Username Is False.
- PasswordBox.Clear()
- Attempts += 1
- MessageBox.Show("Incorrect Password!", "Error")
- End If
- End Sub
- 'Integers Here
- Dim Attempts As Integer = 0
- Private Sub hidePassword_CheckedChanged(sender As Object, e As EventArgs) Handles hidePassword.CheckedChanged
- If hidePassword.Checked = True Then 'This Hides The Input In The Password Box.
- PasswordBox.UseSystemPasswordChar = True
- Else
- PasswordBox.UseSystemPasswordChar = False
- End If
- End Sub
- Private Sub registerButton_Click(sender As Object, e As EventArgs) Handles registerButton.Click
- MessageBox.Show("Contact @VpnThaGod On Instagram To Be Registered!", "Register")
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement