Mask / Unmask PwChar in Textbox

Posted on 2005-05-01
Medium Priority
Last Modified: 2008-03-17
How do i make it when i hold down the mouse in the textbox field with the passchar it will show the password and when i let go out mouse button it goes back to pass char.
Question by:thaburner
1 Comment
LVL 11

Accepted Solution

bingie earned 500 total points
ID: 13905777
(Assuming visual basic)

Add a textbox and paste the following:

Private Sub Form_Load()
 Text1.PasswordChar = "#"
End Sub

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Text1.PasswordChar = ""
End Sub

Private Sub Text1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Text1.PasswordChar = "#"
End Sub

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

This is about my first experience with programming Arduino.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Six Sigma Control Plans

862 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