Properties

Properties

This section describes the properties associated with the Microsoft Chat control.


Appearance Property

Description

Retrieves or sets the appearance of the Chat control. This property is persistent and is read-only when connected to a chat room. This property has meaning only if the internal user interface is displayed.

Syntax

object.Appearance[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A short integer expression that determines the appearance of the Chat control. Can be set to one of the return values listed below.

Return Value

Returns a short integer value that indicates the current appearance of the Chat control. Can be one of the following values.
Value Description
0 All flat
1 3-D children only
2 3-D control frame only
3 All 3-D

See Also

BorderStyle, UIOption


BackColor Property

Description

Retrieves or sets the color of the background behind the text panes and the toolbar. This property is persistent and has meaning only if the internal user interface is displayed.

Syntax

object.BackColor[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. An OLE_COLOR expression that determines the background color. The default value is the system's default window background color.

Return Value

Returns the OLE_COLOR value of the current background behind the text panes and toolbar.

See Also

UIOption


BorderStyle Property

Description

Retrieves or sets the appearance of the border. This property is read-only when connected to a chat room and has meaning only if the internal user interface is displayed. This property is persistent.

Syntax

object.BorderStyle[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A short integer expression that determines the border appearance. Can be set to one of the return values listed below.

Return Value

Returns the current border style. Can be one of the following values.
Value Description
0 None
1 Single fixed for children only
2 Single fixed for control frame only
3 All single fixed

See Also

Appearance, UIOption


Height Property

Description

Retrieves or sets the height of the control in HiMetrics. Each HiMetrics unit corresponds to 0.01 millimeters. This property is persistent.

Syntax

object.Height[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A HiMetrics value that indicates the height of the Chat control.

Return Value

Returns the current height of the Chat control in HiMetrics units.

See Also

Width


History Property

Description

Retrieves the current content of the History text box. This property is read-only and has meaning only if the internal user interface is displayed.

Syntax

object.History

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR value that contains the current contents of the History text box. If UIOption does not include the History text box (value=8), this property returns an empty string.

Remarks

The length of this string is limited by the MaxHistoryLength property.

See Also

ClearHistory


LastMessageReceived Property

Description

Retrieves the last message the user received from the channel. This property is read-only.

Syntax

object.LastMessageReceived

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR value that contains the last message received by the user.

Remarks

This property is updated whenever the user receives a text message.

See Also

LastMessageSent


LastMessageSent Property

Description

Retrieves the last message sent by the user. This property is read-only.

Syntax

object.LastMessageSent

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR value that contains the last text message sent by the user.

Remarks

This property is updated whenever the user sends a text message.

See Also

LastMessageReceived


MaxHistoryLength Property

Description

Retrieves or sets the maximum number of characters allowed in the History text box. This property has meaning only if the internal user interface is displayed.

Syntax

object.MaxHistoryLength[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A long integer value that sets the maximum number of characters allowed in the History text box.

Return Value

Returns the maximum number of characters allowed in the History text box. If the UIOption property does not include the History text box (value=8), this property is equal to zero. The default value of MaxHistoryLength is 32K.

See Also

ClearHistory, History


MaxMembers Property

Description

Retrieves or sets the maximum number of members in a chat room.

Syntax

object.MaxMembers[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A long integer expression that determines the maximum number of members allowed in the room. Only a host of the chat room can change this property.

Return Value

Returns zero if the limit is the server's default limit, or the maximum number of members otherwise.

See Also

MemberCount


MaxMessageLength Property

Description

Retrieves or sets the maximum number of characters allowed in the Send text box.

Syntax

object.MaxMessageLength[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A long integer value that determines the maximum number of characters allowed in the Send text box. The default value is 2040 characters, which is the maximum message length on an MIC server.

Return Value

Returns the maximum number of characters allowed in the Send text box. If the UIOption property does not include the Send text box (value=16), this property is equal to zero.

See Also

SendMessage


MemberCount Property

Description

Retrieves the number of members currently in the user's chat room. This property is read-only.

Syntax

object.MemberCount

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns zero if the user is not in a chat room, or the number of members in the chat room otherwise.

See Also

MaxMembers


Rating Property

Description

Retrieves the rating of a chat room. This property is read-only.

Syntax

object.Rating

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR value that contains the Platform for Internet Content Selection (PICS) rating if the chat room is on an MIC server. Otherwise, this property returns an empty string. For more information on PICS ratings, see Internet Ratings.


RoomPath Property

Description

Retrieves the location of the chat room to which the user is currently connected. This property is read-only.

Syntax

object.RoomPath

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR expression that evaluates to the server location of the chat room. If the user is not connected to a chat room, an empty string is returned.

Remarks

The format of the server location returned is:

prefix://server-name[:port-number]/[[#]|[&]]room-name

The prefix can be mic or irc. The server-name is the host name of the chat server computer. The optional number sign (#) indicates that the chat room can be a global IRC room. The optional ampersand (&) indicates that the room can be a local IRC or MIC room. The room-name is the name of the chat room.

See Also

EnterRoom


RoomTopic Property

Description

Retrieves or sets the chat room's topic. This property can be used to set the topic when creating a chat room, to change the topic when the user is in the room, or to get the current topic of the room that the user is in.

Syntax

object.RoomTopic[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A BSTR value that indicates the topic name to be set.

Return Value

Returns a BSTR value that contains the topic name of the chat room that the user is currently in.

Remarks

The user cannot set or modify the topic if the chat room was created with the value in the EnterRoom method set to (Type=2), which allows only the host to change the topic, and the user is not the host.

See Also

OnRoomTopicChanged


State Property

Description

Retrieves whether the user is currently disconnected from, connected to, or in the process of connecting to a chat room. This property is read-only.

Syntax

object.State

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns the current user state. Can be one of the following values.
Value Description
1 Disconnected from any chat rooms
2 Connecting to a chat room
3 Connected to a chat room

See Also

CancelEntering, EnterRoom, ExitRoom, OnStateChanged


ThisParticipantAlias Property

Description

Retrieves the user's alias. This property is read-only.

Syntax

object.ThisParticipantAlias

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR value that contains the user's nickname used when the EnterRoom method was called, if the user is currently in a chat room. If the user is not in a chat room, an empty string is returned.

See Also

OnParticipantAliasChanged, ThisParticipantID, ThisParticipantName


ThisParticipantID Property

Description

Retrieves the user's numeric identifier. This property is read-only.

Syntax

object.ThisParticipantID

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a long integer value that contains the user's numeric identifier, if the user is currently in a chat room. If the user is not in a chat room, the value is zero.

See Also

ThisParticipantAlias, ThisParticipantName


ThisParticipantName Property

Description

Returns the user's Microsoft Windows® user name. This property is read-only.

Syntax

object.ThisParticipantName

PartDescription
object Required. An object expression that evaluates to a Chat control.

Return Value

Returns a BSTR value that contains the user's Windows user name, if the user is currently in a chat room. If the user is not in a chat room, an empty string is returned.

See Also

ThisParticipantAlias, ThisParticipantID


UIOption Property

Description

Contains flags that control the appearance of the default user interface. This property is a bitmask.

Syntax

object.UIOption[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A short integer expression that equals the sum of the desired user interface option values. Can include the following option values.
Value Description
1 Set this value to display the Send button. Must set the Send text box (value=16) in order to set the Send button.
2 Set this value to display the Whisper button. Must set the Send button (value=1) in order to set the Whisper button.
4 Set this value to display the Participant list box.
8 Set this value to display the History text box. This window displays all messages that have been received.
16 Set this value to display the Send text box. The user composes messages in this text box before sending them.
32 Set this value to notify members in the History text box when a new user joins the chat.
64 Set this value to notify members in the History text box when a user leaves the chat.
128 Set this value to allow the Chat control to display a dialog box that notifies the user when a member's status (host, participant, or spectator) changes, when a member's alias (nickname) changes, and when the user has been kicked by a host.
256 Set this value to insert a blank line between messages in the History text box.
512 Set this value to allow the Chat control to display error dialog boxes. When an OnError event is triggered, a dialog box containing the error message will appear.
1024 Set this value to allow the user to resize the control.
2048 Set this value to allow any URLs appearing in the History text box to be clickable.

Return Value

Returns the sum of the option values currently selected.

Remarks

To set a Chat control's user interface so that it includes a Send text box, Send button, Whisper button, History text box, and Participant list box, this property must be set to the sum of the option values. In this case, the sum would equal 31 (16 + 1 + 2 + 8 + 4 = 31). To set the control to have all options, the sum would equal 4095 (1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 2048 = 4095).

See Also

Appearance, BackColor, BorderStyle, History, MaxHistoryLength, MaxMessageLength


Width Property

Description

Returns or sets the width of the control in HiMetrics. Each HiMetrics unit corresponds to 0.01 millimeters. This property is persistent.

Syntax

object.Width[=value]

PartDescription
object Required. An object expression that evaluates to a Chat control.
value Optional. A HiMetrics value that indicates the width of the Chat control.

Return Value

Returns the current width of the Chat control in HiMetrics units.

See Also

Height

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.