473,399 Members | 3,038 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,399 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 4189
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
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,...
0
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...

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.