Search code examples
delphivcldelphi-xe3

Delphi - TEdit / TMaskEdit not displaying Asterisk (*) Passwordchar


I'm using Delphi XE3 for VCL application development. I'm having TMaskEdit field in my form and i have set its PasswordChar property as Asterisk ( * ) . But when i execute the application it's displaying password character as Dot (.) instead of Asterisk ( * ).

enter image description here

Please help me on this.


Solution

  • Try this

    SendMessage(MaskEdit1.Handle, EM_SETPASSWORDCHAR, Ord('*'), 0);
    

    You can put this on your FormCreate event or anywhere