Click here for NewsObjects Overview
ShowLogon Method (Connect Control)
Windows - Visual C++


Description
The ShowLogon method displays the Logon dialog box and if the user clicks the OK button, performs the logon. 

Syntax
long ShowLogon();

Return Value
0 if connection succeeds; -1 if user clicks the Cancel button. Error code if there was an error connecting to the server.

Remarks
You can set up the Username, Password and/or the Server properties prior to calling ShowLogon if you would like them to appear in the dialog box. Alternatively, you can set the UseSavedNames property to indicate that the UserName, Password and Server should be obtained. You can use the AreNamesSaved method to determine if the Username, Password and Server have been saved in the .ini file or Windows registry.

The username and server entered by the user into the dialog box are automatically saved in the .ini file or Windows registry. If the user checks the "Remember my password" checkbox, then the password will also be saved in the .ini file or Windows registry and the SavePassword property will be set to TRUE. The "Remember my password" checkbox is only visible when UseSavedNames is set to TRUE.

You may need to set the Section property prior to calling Logon. The default behavior is that the Section is obtained from the ini file.

To logon without displaying a dialog box use the Logon method.

See Also: AreNamesSaved Logon Password SavePassword Section Server UserName UseSavedNames

Back to: Connect Methods