Contains forms and routines used to implement a database login dialog.

dblogdlg.pas contains the TLoginDialog dialog form used to capture the user name and password used to login to a database. The LoginDialogEx routine is provided to create, configure, and execute a TLogInDialog instance.

Implements a database login dialog form.

TLoginDialog is a TForm descendant which implements a database login form. TLoginDialog contains labels and edits used to display and/or edit Database Name, User Name, and Password values. Database Name is read-only and cannot be changed on the form. The User Name can optionally be read-only. It also has a button panel with Login and Cancel buttons.

Use LoginDialogEx to create, configure, and display an instance of TLoginDialog using the arguments passed to the routine.

Label used to display the Database Name for the dialog form.
Label for the Database Name field.
Label for the User Name field.
Label for the Password field.
Edit control used to enter the User Name.
Edit control used to enter the Password.
Button Panel for the OK and Cancel buttons on the dialog.
Constructor for the class instance.
Owner of the class instance.
Creates, configures, and displays a TLoginDialog dialog form.

LoginDialogEx is a Boolean function used to create, configure, and display a TLoginDialog dialog form. The return value contains True when the ModalResult for the form display contains the value mrOk.

LoginDialogEx creates an instance of TLoginDialog, and sets the values in the controls used on the form. The arguments in ADatabaseName, AUserName, and APassword are assigned to the corresponding controls. UserNameReadOnly indicates whether the edit control for UserName can be modified; the default value is False.

LoginDialogEx calls ShowModal to display the form as a modal dialog, and captures the ModalResult. When ModalResult contains mrOk, the return value is set to True.

LoginDialogEx frees the form instance prior to exiting from the routine.

True when the ModalResult for the form is mrOk.
Database name displayed on the form.
User name edited on the form.
Password edited on the form.
True if the User Name cannot be changed in the form.
Resource string with the Caption displayed on the dialog form.
Resource string for the Database label.
Resource string for the User Name label.
Resource string for the Password label.
Resource string with the caption for the OK button.