How to Change Password Character in Runtime using VB.Net

0
74

This Tutorial is all about How to Change Password Character in Runtime using VB.Net. In this tutorial you will be able to learn How to Change Password Character in Runtime using VB.Net. So lets get Started:

  • First is open the Visual Basic, Select File on the menu, then click New and create a new project.

  • Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK

  • After that, design your form like this just like what I’ve shown you below.
    Add a 2 label, 2 Textbox, and a Checkbox.

  • Then add this Code to the Textbox.
    1. Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
    2. TextBox1.PasswordChar = TextBox2.Text
    3. End Sub
  • Add this Code to the Checkbox.
    1. Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
    2. If CheckBox1.Checked = True Then
    3. TextBox1.PasswordChar = ""
    4. Else
    5. TextBox1.PasswordChar = TextBox2.Text
    6. End If
    7. End Sub
  • Finally, Click F5 to run

Output

If you have any comments or suggestions about on How to Change Password Character in Runtime using VB.Net, please feel free to contact our webpage.

Download How to Change Password Character in Runtime using VB.Net Here

Other Articles Readers might read:

 

 

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here