PasswordChar Property in Visual Basic.Net

Download
Download is available until [expire_date]
  • Version
  • Download 38
  • File Size 117.66 KB
  • File Count 1
  • Create Date February 27, 2016
  • Last Updated February 27, 2016

PasswordChar Property in Visual Basic.Net

PasswordChar property in vb.net

PasswordChar property is used in order to hide the actual text you have entered in a textbox.

The source code will teach you on how to change the passwordchar property in runtime environment.

Here is the code:

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        TextBox1.PasswordChar = TextBox2.Text

End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            TextBox1.PasswordChar = ""
        Else
            TextBox1.PasswordChar = TextBox2.Text
        End If

End Sub
, , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.