Create login screen at run time

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 code and password ) to make some criticism?

    
asked by anonymous 12.12.2016 / 11:43

2 answers

1

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;
    
19.12.2016 / 18:22
0

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

    
12.12.2016 / 11:59