LoginWithDialog(String,Boolean,Boolean,Boolean) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The LoginWithDialog() method opens the Login dialog to allow a user name and password to be entered. The dialog then attempts to log the user on using the information entered. If the Login dialog is canceled or errors, it records that fact along with the name of the dialog that called for the logon. This prevents the Login dialog from being opened for any other controls on the same dialog.
This overload of the method includes three flags that determine whether:
- A Cancel is confirmed in the dialog
- A Cancel button is displayed in the dialog
- An 'Always login as this user' check box is displayed in the dialog
'Declaration
Public Overloads Function LoginWithDialog( _
ByVal formName As String, _
ByVal confirmCancel As Boolean, _
ByVal disableCancel As Boolean, _
ByVal showAlwaysLoginCheckbox As Boolean _
) As Boolean
public bool LoginWithDialog(
string formName,
bool confirmCancel,
bool disableCancel,
bool showAlwaysLoginCheckbox
)
Parameters
- formName
- Required. Holds the name of the form requesting the logon. Pass an empty string "" to log on additional users.
- confirmCancel
- Required. Holds a flag that, if set to true, causes a Cancel to be confirmed in the Login dialog.
- disableCancel
- Required. Holds a flag that, if set to true, causes a Cancel button to be displayed in the Login dialog.
- showAlwaysLoginCheckbox
- Required. Holds a flag that, if set to true, causes the 'Always login as this user' check box to be displayed in the Login dialog if the system parameter allows it.
Return Value
Returns true if the user logs on, or false if the user cancels the logon or if
there was an error while logging on.