Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'NiCz Tutorials - NiCzRanara'
- --
- Rename the forms:
- Form1 > Register
- Form2 > Login
- Form3 > Main
- Project Properties > Settings:
- --
- Project Properties > Settings:
- Username
- Password
- --
- Add the elements given below to "Register Form"
- Textbox1 - for the Username
- Textbox2 - for the Password ( You can use Password Char if you want )
- Button1 - for the Confirmation of Registration
- Button2 - to go back to the 'Login Form'
- --
- Codes for "Registration Form" (Double-Click 'Confirm' Button)
- My.Settings.Username = TextBox1.Text
- My.Settings.Password = TextBox2.Text
- My.Settings.Save()
- MsgBox("You're account is now Registered.", MsgBoxStyle.Information, "Registration Successful!")
- Main.Show()
- Me.Close()
- --
- Add the elements given below to "Login Form"
- Textbox1 - for the Username
- Textbox2 - for the Password ( You can use Password Char if you want )
- Button1 - to Login to the Program
- Button2 - to go to Register Form
- Button3 - to Exit the Program
- --
- Codes for "Login Form" (Double-Click 'Login' Button)
- If TextBox1.Text = My.Settings.Username And TextBox2.Text = My.Settings.Password Then
- MsgBox("You're now logged in.", MsgBoxStyle.Information, "Now Logged In")
- Main.Show()
- Me.hide()
- End If
- --
- Login Form - Registration Button (Double-click 'Register' Button)
- Register.show
- Me.hide
- --
- Code for the Exit button on Login Form (Double-click 'Exit' Button)
- Me.close
- --
- Code for the Exit button on Register Form (Double-click 'Exit' Button)
- Login.Show
- Me.hide
- 'Thank you for watching and using this code - NiCzRanara - NiCz Tutorials'
Advertisement
Add Comment
Please, Sign In to add comment