TTMSFNCTaskdialog for the query of user data

Can the query of user data be implemented with the help of TTMSFNCTaskDialog?

For example:

InputQuery( 'Login', ['Username', #1'Password:'], ['', ''],
  procedure(const AResult: TModalResult; const AValues: array of string)
    begin
    end);

Kind regards
Ulrich

Hi,

While TTMSFNCTaskDialog is mainly for showing messages, such query dialog can be mimicked.

To do this create a TPanel with no borders and the same background color as TTMSFNCTaskDialog (or simply use TLayout if you are using FMX). Put your "Username" and "Password" TLabel and TEdit controls on it and then set TTMSFNCTaskDialog.InputType to titCustom.

Then you'll need to assign this TPanel/TLayout to TTMSFNCTaskDialog.InputControl.

After TTMSFNCTaskDialog.Execute you can access the username/password values directly from the TEdit controls. You might also want to consider setting TEdit.Text to an empty string before or after showing the dialog to avoid showing the filled TEdit controls the next time the dialog is opened.

Thanks.

Kind regards
Ulrich