473,783 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#-> textBox1.Passwo rdChar

Is there a way to take a text, from a textbox & later passwordChar the text.
I'm not using a masked textbox.

I tried:

textBox1.Passwo rdChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't know
how to take a text THEN passwordchar it...Any code samples will be great!

please keep it simple b/c im a beginner
Nov 16 '05 #1
5 10380
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.Passwo rdChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotma il.com> wrote in message
news:OK******** ******@TK2MSFTN GP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.Passwo rdChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner

Nov 16 '05 #2
It did not work
"Robert Misiak" <rm*****@users. cutthispartout. sourceforge.net > wrote in
message news:hy******** ********@newsre ad1.news.pas.ea rthlink.net...
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.Passwo rdChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotma il.com> wrote in message
news:OK******** ******@TK2MSFTN GP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.Passwo rdChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner


Nov 16 '05 #3
Wes
Hello Hareth,

I don't think the assignment:
textBox1.Text = textBox1.Text;
will work because it detects that it is the same and will not actually reset the text to the same value.

You could possibly try this:

textBox1.Passwo rdChar = '*'
string tmp = textBox1.Text;
textBox1.Clear( );
textBox1.Text = tmp;

This seems like such a hack but I don't know of any other way right now.

HTH
Wes Haggard
http://weblogs.asp.net/whaggard/
It did not work

"Robert Misiak" <rm*****@users. cutthispartout. sourceforge.net > wrote
in message
news:hy******** ********@newsre ad1.news.pas.ea rthlink.net...
You need to reset the text in the TextBox after assigning
PasswordChar:

textBox1.Passwo rdChar = '*';
textBox1.Text = textBox1.Text;
HTH,
Robert


Nov 16 '05 #4
doesnt work
"Robert Misiak" <rm*****@users. cutthispartout. sourceforge.net > wrote in
message news:hy******** ********@newsre ad1.news.pas.ea rthlink.net...
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.Passwo rdChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotma il.com> wrote in message
news:OK******** ******@TK2MSFTN GP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.Passwo rdChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner


Nov 16 '05 #5
Try this:
textBox1.Passwo rdChar = '*';
textBox1.Refres h();

Chris Jobson

"Hareth" <ab******@hotma il.com> wrote in message
news:uo******** ******@TK2MSFTN GP15.phx.gbl...
doesnt work
"Robert Misiak" <rm*****@users. cutthispartout. sourceforge.net > wrote in
message news:hy******** ********@newsre ad1.news.pas.ea rthlink.net...
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.Passwo rdChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotma il.com> wrote in message
news:OK******** ******@TK2MSFTN GP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.Passwo rdChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner



Nov 16 '05 #6

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

Similar topics

3
719
by: Rick | last post by:
In VB .Net how do I make the PasswordChar property of a Textbox work out to be that nice big round dot that we see in most system password fields? There is no special character I can see to place in the PasswordChar property to do this. Thanks.
1
6004
by: John | last post by:
I am creating an application which is password controlled on startup. I created a textbox for the user to enter the password. However, I would like to also have a menu option so the user can choose to see '*' in the password box, or the plain text that they are typing in. I want to do this because it is for pocketpc2002 and the characters might not always appear as you think you are writing them in, hence the user option. The problem...
3
583
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 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...
7
9731
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
7
2267
by: Ryan | last post by:
I'm creating a user control that has a handful of controls on it (19 in total). One of the controls on the UC is a textbox for a user's password, so I've set the PasswordChar property to "*". I rebuild and all is well. The problem arises when I have the PasswordChar set, and then try to set Localizable to True for the UC. If I set Localizable to true and have PasswordChar set and rebuild, Visual Studio 2005 will then try to reload the...
0
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10315
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10083
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9946
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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 we have to send another system

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.