The * in the InputBox

I am using an InputBox to get a text string which is a password, the only problem is that when the person is entering the password everyone can see it.  What I need to do is change the text that is displayed to a * for each character.  

Any Ideas.

Thanks, Peat.
peat042998Asked:
Who is Participating?
 
MasseyMConnect With a Mentor Commented:
Use the OnKeyPressed event.   When the key is pressed, put the "*" in the text box and add the keypressed to a string value.


0
 
Steve GronerLead Systems EngineerCommented:
I would create my own form to do that.  The Inputbox is not really designed for this purpose. It is strictly for string input without masking.

Use a form, and place a textbox onto it, and change the password character to * that should od it for you.

If you need assistance doing this please let me know.
0
 
peat042998Author Commented:
Sorry, It has to go that way.  I have tried what you are saying and it is not what I need
0
 
MikeP090797Commented:
sgroner is 100% right. InputBox is provided for the simplest input. It's not flexible, and if you need anything beyond what it provides, you have to create a window on your own. I don't see any reason why it won't look exactly like inputbox
0
 
MikeP090797Commented:
It can be done much easier using the PasswordChar property of the text box, just set it to *
0
All Courses

From novice to tech pro — start learning today.