?
Solved

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

Posted on 2013-01-16
4
Medium Priority
?
677 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 16

Assisted Solution

by:Imran Javed Zia
Imran Javed Zia earned 668 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 668 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 664 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:Murray Brown
ID: 38800626
thanks for the help
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

800 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