Click here to Skip to main content
12,350,451 members (24,555 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB VB.NET
There is Textbox (txtPassword) and Checkbox (chkShowPass).

txtPassword has password characters like this (******).

I wanna see the original characters when i check the CheckBox(chkShowPass).

So, How can i write code for that?
Posted 20-Nov-12 20:19pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Refer this similar thread
how to make a checkbox for changing the property of textbox from system password to simple plain text[^]

You can use this[^] link to convert the code from C# to VB.net
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100