Create Login screen at runtime

Asked

Viewed 431 times

1

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 I can get this information (code and password) to make some criticisms?

  • what you already have ready?

  • 1

    @Tiago, could you check any of the answers solve the problem? If Yes mark as answered?

2 answers

1


You can use the Inputquery same. Use help to check how it works in more detail, including with examples. Below I took the example of help and adapted to answer your question. Follow 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;

0

Take a certain shape yes...
It would be through the InputQuery or InputBox. It is true that these features only provide a field for filling, but you can look at the source code of these functions and assemble yours, more or less like this link

Browser other questions tagged

You are not signed in. Login or sign up in order to post.