473,320 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

TextBox.PasswordChar set to true?

This is taken from MSDN
(http://msdn.microsoft.com/library/de...-us/cpref/html
/frlrfsystemwindowsformstextboxclasspasswordchartop ic.asp)
"When the PasswordChar property is set to true, cut, copy, and paste actions
in the control using the keyboard are not allowed, regardless of whether the
Multiline property is set to true or false."

Is it a typo in MSDN or something? How can i set PasswordChar to true since
it is a char? And it gives of course a build error. " Cannot implicitly
convert type 'bool' to 'char' "

Any suggestions?
Nov 16 '05 #1
3 4176
Rosty,

I would say this is a typo from Microsofts part. What it should say
is when this property is not empty, then the provided characters will
be used to mask the input. So basicly the character you set this
property to will be displayed instead of the typed characters. The
standard character to use is the star *

myTextBox.PasswordChar = '*':

Note that when using a single character you use the single quotation '
mark and not the double quotation mark.

HTH,

//Andreas

--
ANDREAS HÅKANSSON
STUDENT OF SOFTWARE ENGINEERING
andreas (at) selfinflicted.org
"rosty" <so*****@microsoft.com> wrote in message news:#g**************@tk2msftngp13.phx.gbl...
This is taken from MSDN
(http://msdn.microsoft.com/library/de...-us/cpref/html
/frlrfsystemwindowsformstextboxclasspasswordchartop ic.asp)
"When the PasswordChar property is set to true, cut, copy, and paste actions
in the control using the keyboard are not allowed, regardless of whether the
Multiline property is set to true or false."

Is it a typo in MSDN or something? How can i set PasswordChar to true since
it is a char? And it gives of course a build error. " Cannot implicitly
convert type 'bool' to 'char' "

Any suggestions?
Nov 16 '05 #2
yes, i see, just have been told by a fellow that MSDN is full of typos, don't know if it's true but looks like here it is at least one of them
"Andreas Håkansson" <andreas (at) selfinflicted.org> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
Rosty,

I would say this is a typo from Microsofts part. What it should say
is when this property is not empty, then the provided characters will
be used to mask the input. So basicly the character you set this
property to will be displayed instead of the typed characters. The
standard character to use is the star *

myTextBox.PasswordChar = '*':

Note that when using a single character you use the single quotation '
mark and not the double quotation mark.

HTH,

//Andreas

--
ANDREAS HÅKANSSON
STUDENT OF SOFTWARE ENGINEERING
andreas (at) selfinflicted.org
"rosty" <so*****@microsoft.com> wrote in message news:#g**************@tk2msftngp13.phx.gbl...
This is taken from MSDN
(http://msdn.microsoft.com/library/de...-us/cpref/html
/frlrfsystemwindowsformstextboxclasspasswordchartop ic.asp)
"When the PasswordChar property is set to true, cut, copy, and paste actions
in the control using the keyboard are not allowed, regardless of whether the
Multiline property is set to true or false."

Is it a typo in MSDN or something? How can i set PasswordChar to true since
it is a char? And it gives of course a build error. " Cannot implicitly
convert type 'bool' to 'char' "

Any suggestions?
Nov 16 '05 #3
rosty <so*****@microsoft.com> wrote:
yes, i see, just have been told by a fellow that MSDN is full of
typos, don't know if it's true but looks like here it is at least one
of them


There are certainly several mistakes in there, and bits of dodgy code.
I've made a point of using the link at the bottom of the page to tell
MS whenever I see a problem - they're very good at acknowledging
mistakes and fixing them for the next MSDN release.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rosty | last post by:
This is taken from MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html /frlrfsystemwindowsformstextboxclasspasswordchartopic.asp) "When the PasswordChar property is...
9
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox? Or can I use for mask input some other control?
1
by: Emaga75 | last post by:
In dotNET windows_based deployment project user interface form, How to mask a textbox for input password? Thanks.
0
by: JMarques | last post by:
I have one DataGrid with one column colPWD, and the code DataGridTableStyle dgStyle = new DataGridTableStyle(); DataGridTextBoxColumn colPWD = new DataGridTextBoxColumn(); colPWD.MappingName =...
7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
1
by: Samuel | last post by:
An example program gave me a demo how to design a keypad (button matrix) and append entered key to a string, but show "*" (star) signs in a text box. The Programmer-designed screen keypad...
3
by: Bernie Hunt | last post by:
I have a login dialog that has a text box on it for the user to type their password. How can I obscure the information they are entering into the password box? I could blank it, but a more...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
0
by: SteveL | last post by:
Hi, I'm trying to change the default height of Textboxes in a form of my Mobile Application, without resorting to making them MultiLine, which turns off the Passwordchar substitution). Research...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.