Solved

VB.net/VBA Typing password into text box (making it invisible)

Posted on 2013-01-16
4
643 Views
Last Modified: 2013-01-21
Hi

I have two text boxes  in my application that the user uses to log in
In the second password box I don't want the password to be visible but
instead I'd like dots or x's to appear.

How should do this?

Thanks
0
Comment
Question by:murbro
4 Comments
 
LVL 16

Assisted Solution

by:Imran Javed Zia
Imran Javed Zia earned 167 total points
ID: 38786053
Hi,
If you are working in Winforms then you can either use textmast of textbox control or better to use PasswordBox control
Thanks
0
 
LVL 11

Assisted Solution

by:Deepak Lakkad
Deepak Lakkad earned 167 total points
ID: 38786072
For ASP.Net there is TextMode property for TextBox. You can use it in following way.

<asp:TextBox id="tb2" TextMode="password" runat="server" />

Open in new window


For WinForms, there is PasswordChar Property for TextBox. You can set any character in this property. The character will appear in textbox in place of your actual text.

- Deepak Lakkad
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 166 total points
ID: 38786145
Set the PasswordChar property of Textbox to any character you want such as * or x

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.passwordchar.aspx
0
 

Author Closing Comment

by:murbro
ID: 38800626
thanks for the help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now