pr2501
asked on
password mesage box
With code below i work with one password.
How should i changeit to make it work with more passwords?
How should i changeit to make it work with more passwords?
//// password
procedure tform2.controlpassword();
begin
ThePassword:=('xyz'); //my password
if richeditWriteOKpassword then
// nothing
else begin
PostMessage(Handle, InputBoxMessage, 0, 0);
If InputBox('set editing','Password:','')=(ThePassword)
Then begin
// richedit1.ReadOnly:=false;
combobox1.Enabled:=true;
combobox2.Enabled:=true;
richeditWriteOKpassword:=true;
richedit1.color:=clwhite;
end;
end;
end;
// ******************* pasword
procedure TForm2.InputBoxSetPasswordChar(var Msg: TMessage);
var
hInputForm, hEdit, hButton: 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;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER