Hello All,
I am creating a Dialog to ask users entry their password to go to the next step. When users type their PW in the box how can we change it to asterisk symbol only?
For ex: Instead of showing 12345 PW on screen, I want this ***** is shown when user types the PW.
Thanks
ENTRY PASSWORD IN DIALOG
Moderators: Dorian (MJT support), JRL
Re: ENTRY PASSWORD IN DIALOG
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 317
Top = 198
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'Enter your password'
ClientHeight = 113
ClientWidth = 340
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 272
Top = 24
Width = 32
Height = 13
Caption = 'VIEW'
end
object Edit1: TEdit
Left = 39
Top = 15
Width = 218
Height = 21
PasswordChar = '*'
TabOrder = 0
Text = 'PasswordChar is *'
end
object MSButton1: tMSButton
Left = 133
Top = 78
Width = 75
Height = 25
Caption = 'Ok'
TabOrder = 9
Default = True
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,MSButton1,OnClick,srtProcess
AddDialogHandler>Dialog1,Label1,OnMouseDown,srtDisplayChars
AddDialogHandler>Dialog1,Label1,OnMouseUp,srtHideChars
AddDialogHandler>Dialog1,,OnClose,Quit
Show>Dialog1,
SRT>srtProcess
GetDialogProperty>Dialog1,Edit1,Text,vPWStr
MDL>vPWStr
Exit>0
END>srtProcess
SRT>srtDisplayChars
SetDialogProperty>Dialog1,Edit1,PasswordChar,nullchar
END>srtDisplayChars
SRT>srtHideChars
SetDialogProperty>Dialog1,Edit1,PasswordChar,*
END>srtHideChars
SRT>Quit
Exit>0
END>Quit