How to set your TextBox to Show and Hide Password in the User Registration Form.

In this turtorial, I will teach you how to set your Textbox to "show" and "hide" Password in the User Rgistration Form by using Visual Basic 2008. This will help you determined the password that you have input in the Textbox when registering in the User Registration Form. So let’s begin: Open the Visual Basic 2008 and create a new Windows Form Application. After that, do the Form just like this. AdduserForm Double click the checkbox and do this following code in the method.
  1. 'CHECKING IF THE CHECKBOX WAS CHECKED OR NOT.
  2. If CheckBox1.CheckState = CheckState.Checked Then
  3. 'IF TRUE, IT SHOW THE TEXT
  4. txtpass.UseSystemPasswordChar = False
  5. Else
  6. 'IF FALSE, IT WILL HIDE THE TEXT AND IT WILL TURN IT INTIO BULLETS.
  7. txtpass.UseSystemPasswordChar = True
  8. End If
Go back to the design views, double click the form and do this following code in the Form_Load.
  1. 'HIDE THE TEXT OF THE TXTPASS ON THE FIRST LOAD
  2. txtpass.UseSystemPasswordChar = True
These are the full codes that you have made.
  1. Public Class Form1
  2. Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
  3. 'CHECKING IF THE CHECKBOX WAS CHECKED OR NOT.
  4. If CheckBox1.CheckState = CheckState.Checked Then
  5. 'IF TRUE, IT SHOWS THE TEXT
  6. txtpass.UseSystemPasswordChar = False
  7. Else
  8. 'IF FALSE, IT WILL HIDE THE TEXT AND IT WILL TURN INTO BULLETS.
  9. txtpass.UseSystemPasswordChar = True
  10. End If
  11. End Sub
  12.  
  13. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  14. 'HIDE THE TEXT OF THE TXTPASS ON THE FIRST LOAD
  15. txtpass.UseSystemPasswordChar = True
  16. End Sub
  17. End Class
Now, press F5 to run your project.

Comments

Submitted byMmathabo Carol… (not verified)on Mon, 08/11/2014 - 15:08

Hey Janobe. Where exactly will this program register the user? In database or what?

Add new comment