Connect MethodConnect Method*
*Contents  *Index  *Topic Contents
*Previous Topic: ChangeUserProperty Method
*Next Topic: Disconnect Method

Connect Method

Creates a connection between the user's computer and the server.

Syntax

object.Connect ServerName

Parameters

objectRequired. An object expression that evaluates to an MsChatPr control.
ServerNameRequired. A string expression that contains the ServerName. This parameter can include the socket port to be used. The port 6667 is used by default.

Remarks

A successful Connect call results in an OnConnectionState event for which the ConnectionState parameter is csConnecting. Next, an OnConnectionState event is fired for which the ConnectionState parameter is csConnected. The server properties accessible at the csConnected point are:
Name
MaxMessageLength
SecurityPackages
AnonymousAllowed
IgnoredUsers

All the other server properties can be accessed once the user is logged on.

Examples

'ServerName only, port 66667 by default
MsChatPr1.Connect "comicsrv1.microsoft.com" 
'ServerName and socket port
MsChatPr1.Connect "irc.eskimo.com:6668"      

See Also

Login


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.