Answered by:
Password Box Help!

Question
-
Hey everybody I'm having problem using the 'Password Box' I actually don't know how to use the password box likeif I've a password "12345678"then how will I be able to write the code to accept this password for my application Please help me. !Thursday, October 1, 2009 9:22 AM
Answers
-
Dear,
When you set the PasswordChar property of the textbox; it will become a password box with copy preventing properties automatically, try doing so, it will work.
thanks
[Please mark it as an answer if it works for you]Thursday, October 1, 2009 11:10 AM -
Dear,
checkout this
http://www.tanguay.info/web/index.php?pg=codeExamples&id=220
remember to mark as an answer if it works for you.
Thanks- Marked as answer by Smith010 Thursday, October 1, 2009 3:20 PM
Thursday, October 1, 2009 2:51 PM
All replies
-
Its simple
in windows application just take a textbox and set its PasswordChar property to "*" (without quotes) or any other character which you want for password charatcer.
Finally on the button event handler write the following code to get the typed password.string password = textBox1.Text;
Thanks
[Please mark it as an answer if it works for you]- Proposed as answer by Andez Thursday, October 1, 2009 10:50 AM
Thursday, October 1, 2009 10:42 AM -
I want to use Password box not the Textbox because the Password box provides security like anyone can't copy - paste the password from the password boxbut it can be copy - pasted from a textbox, So please tell me how to use the password box, I've already used the text box as a password box in my applicationPlease tell me about the password box. And thanks for support.Thursday, October 1, 2009 11:01 AM
-
Dear,
When you set the PasswordChar property of the textbox; it will become a password box with copy preventing properties automatically, try doing so, it will work.
thanks
[Please mark it as an answer if it works for you]Thursday, October 1, 2009 11:10 AM -
There is no Password text control in the WinForms library. You can only use the TextBox as MS Ninja has said or alternatively the MaskedTextBox. They both provide same password functionality.
Andez (Please mark as answer if it helps)Thursday, October 1, 2009 11:57 AM -
I'm working in C# WPF Application sorry for the miss understanding.Thursday, October 1, 2009 12:00 PM
-
Dear,
checkout this
http://www.tanguay.info/web/index.php?pg=codeExamples&id=220
remember to mark as an answer if it works for you.
Thanks- Marked as answer by Smith010 Thursday, October 1, 2009 3:20 PM
Thursday, October 1, 2009 2:51 PM -
That worked thanks a lot!Thursday, October 1, 2009 3:21 PM
-
ok thanks
Alan
Tuesday, December 26, 2017 3:51 PM