Solved

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

Posted on 2013-01-16
4
652 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
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 create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

832 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