How do I place a Password field in a Messagebox?

Asked

Viewed 1,258 times

5

How to enter a field that I can put a password into MessageBox.

I could call one form, but wanted something simpler and faster, I would like that when I click on a button it provides a field to put a password that will be set later, this password will release the function of the button.

  • I know it’s not a Messagebox, but there is Inputbox, which is a message where the user can enter some information, as in your case is a password, it would not be nice to leave it visible, so I found that link (VB.NET code) that defines a mask in the user input, if you are interested!

  • 1

    Thank you Matthew. And would like to know what was not clear in the question, so I can clarify.

  • 1

    @Felipewalleg has some crazy people here. Worse that was voted after having an answer accepted. What I advise you is to try to write in a more organized way, to separate more into paragraphs whenever possible, to think before writing, not to put as if you had spoken. This helps the staff to see clarity. Take advantage and don’t say greetings before or after. Think of this as a question of proof. Ever seen question give good morning or say thank you? Here is a question and answer site and not a forum.

  • Got it, mustache

  • The Function InputBox() not the medium to hide the characters, but is a MessageBox with a text box.

1 answer

7


It is not possible, the MessageBox was created to issue alerts and not to input data.

You will have to create a Form and use a TextBox on it. You can use PasswordChar to hide the typed data.

If you want to simulate behavior called modal of MessageBox it is possible to use the ShowDialog() on the standard form.

  • Thanks, I would like to avoid this method but visa will not have escape, rsrs Thanks again!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.