473,387 Members | 3,810 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,387 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 4187
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.