LoginWithDialog(String,Boolean,Boolean) Method
- Last UpdatedNov 06, 2025
- 1 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 form 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 two flags that determine whether:
- A Cancel is confirmed in the dialog
- A Cancel button is displayed in the dialog
'Declaration
Public Overloads Function LoginWithDialog( _
ByVal formName As String, _
ByVal confirmCancel As Boolean, _
ByVal disableCancel As Boolean _
) As Boolean
public bool LoginWithDialog(
string formName,
bool confirmCancel,
bool disableCancel
)
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.
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.