Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi InputBox for password entry?

Inputbox:

answer:=Inputbox('a','b','c');

works good, but I'm looking for a masked one, like a password box where you only see little stars instead of the typed characters.

like image 204
Arthur Avatar asked Feb 26 '09 16:02

Arthur


1 Answers

In XE2, InputBox() and InputQuery() were updated to natively support masking the TEdit input, although that feature has not been documented yet. If the first character of the APrompt parameter is set to any value < #32 then the TEdit.PasswordChar will be set to *, eg:

answer := InputBox('a', #31'b', 'c');
like image 80
Remy Lebeau Avatar answered Sep 17 '22 15:09

Remy Lebeau