const
InputBoxMessage = WM_USER + 200;
private
procedure InputBoxSetPasswordChar(var Msg: TMessage); message InputBoxMessage;
procedure TForm1.InputBoxSetPasswordChar(var Msg: TMessage);
var
hInputForm, hEdit: HWND;
begin
hInputForm := Screen.Forms[0].Handle;
if (hInputForm <> 0) then
begin
hEdit := FindWindowEx(hInputForm, 0, 'TEdit', nil);
{
// Change button text:
hButton := FindWindowEx(hInputForm, 0, 'TButton', nil);
SendMessage(hButton, WM_SETTEXT, 0, Integer(PChar('Cancel')));
}
SendMessage(hEdit, EM_SETPASSWORDCHAR, ord('*'), 0);
end
end;
usage
PostMessage(Handle, InputBoxMessage, 0, 0);
pass:=sinputbox('Verify Your Account : ','Password : ','');