Disconnect MethodDisconnect Method*
*Contents  *Index  *Topic Contents
*Previous Topic: Connect Method
*Next Topic: IgnoreUsers Method

Disconnect Method

Disconnects from the chat server.

Syntax

object.Disconnect

Parameters

objectRequired. An object expression that evaluates to an MsChatPr control.

Remarks

The Disconnect method can be called when the connection state is csConnected or csLogged.

A successful call results in an OnConnectionState event for which the connection state is csDisconnecting, and another OnConnectionState event for which the ConnectionState parameter is csDisconnected.

Examples

MsChatPr1.Connect "comicsrv1.microsoft.com"
    'OnConnectionState(csConnecting) event is fired
    'OnConnectionState(csConnected) event is fired
MsChatPr1.Disconnect

MsChatPr1.Login "irc.mtv.com", "JB007", "JamesB", "James Bond"
    'OnConnectionState(csConnecting) event is fired
    'OnConnectionState(csLogging) event is fired
    'OnConnectionState(csLogged) event is fired
MsChatPr1.Disconnect

See Also

Connect, Login, OnConnectionState


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