I have an inputbox and would like the user to enter a password, but at the same time hide it.
Is this possible?
This is my code so far:
var password : string;
begin
password := InputBox('Password: ', 'Please enter your password: ', password)
end;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You ‘cannot’ use
InputBoxfor this, because, well… clearly this function doesn’t hide the text.The standard Windows edit control has a ‘password mode’, though. To test this, simply add a
TEditto a form and set itsPasswordCharto*.If you want to use such an edit in an input box, you have to write this dialog yourself, like my ‘super input dialog’:
Try it: