How to create within a ShowMessage
or ShowModal
a message where the user would have to enter the code and password, when leaving this ShowMessage
code and password ) to make some criticism?
How to create within a ShowMessage
or ShowModal
a message where the user would have to enter the code and password, when leaving this ShowMessage
code and password ) to make some criticism?
You can even use InputQuery . Use the help to see how it works in more detail, including examples. Below I took the help example and adapted to answer your question. Here is the code:
procedure TForm1.Button1Click(Sender: TObject);
begin
InputQuery('Título da caixa de diálogo', ['Código', #1'Senha:'], ['', ''],
procedure(const AResult: TModalResult; const AValues: array of string)
var
str: string;
begin
if AResult = mrOk then
begin
ShowMessage('Meu código é: ' + AValues[0]);
ShowMessage('Minha senha é: ' + AValues[1]);
end;
end);
end;
Give some form yes ...
It would be by InputQuery
or InputBox
. It's true that these features only provide a fill-in field, but you can look at the source code of those functions and build yours, more or less like this link