473,473 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4197
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
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.