Contents Index Topic Contents | ||
Previous Topic: CreateChannel Method Next Topic: KickMember Method |
JoinChannel Method
Allows the user to join an existing channel or create a new channel.
Syntax
object.JoinChannel [ChannelName][, ChannelKeyword]
Parameters
object Required. An object expression that evaluates to a Channel object. ChannelName Optional. A variant that contains the Name of the channel. If specified, the ChannelName variant must be empty or a string that is a valid channel Name. If the parameter is empty or not specified, the current value of the ChannelName property is used instead. ChannelKeyword Optional. A variant. If specified, this variant must be empty or a string. If the parameter is empty or not specified, the control tries to join the channel without using a Keyword. Remarks
The channel state must be chsClosed for the call to succeed, and the channel must belong to the collection for the call to be successful.
A JoinChannel call results in the same kind of events as a CreateChannel call.
At creation time, the state of the created channel is chsClosed. Then, when calling its JoinChannel or CreateChannel method, the state becomes asynchronously chsOpening and chsOpen. It becomes chsClosed again when the user leaves the channel or is kicked from the channel, or when a server disconnection occurs.
Example
'Specifies the ChannelName and ChannelKeyword MsChatPr1.Channels(lIndex).JoinChannel "#MyRoom", "SecretPassword" 'Specifies only the ChannelName MsChatPr1.Channels(lIndex).JoinChannel "#MyRoom"See Also
ChannelName, ChannelState, enumChannelState, OnChannelState, OpeningChannels
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.