Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET WinForm
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
0 Sergey Alexandrovich Kryukov 410
1 Maciej Los 280
2 OriginalGriff 248
3 CHill60 186
4 Sinisa Hajnal 145


Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2014
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