This section describes the properties associated with the Microsoft Chat control.
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.
object.Appearance[=value]
Part Description 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.
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
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.
object.BackColor[=value]
Part Description 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.
Returns the OLE_COLOR value of the current background behind the text panes and toolbar.
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.
object.BorderStyle[=value]
Part Description 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.
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
Retrieves or sets the height of the control in HiMetrics. Each HiMetrics unit corresponds to 0.01 millimeters. This property is persistent.
object.Height[=value]
Part Description object Required. An object expression that evaluates to a Chat control. value Optional. A HiMetrics value that indicates the height of the Chat control.
Returns the current height of the Chat control in HiMetrics units.
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.
object.History
Part Description object Required. An object expression that evaluates to a Chat control.
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.
The length of this string is limited by the MaxHistoryLength property.
Retrieves the last message the user received from the channel. This property is read-only.
object.LastMessageReceived
Part Description object Required. An object expression that evaluates to a Chat control.
Returns a BSTR value that contains the last message received by the user.
This property is updated whenever the user receives a text message.
Retrieves the last message sent by the user. This property is read-only.
object.LastMessageSent
Part Description object Required. An object expression that evaluates to a Chat control.
Returns a BSTR value that contains the last text message sent by the user.
This property is updated whenever the user sends a text message.
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.
object.MaxHistoryLength[=value]
Part Description 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.
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.
Retrieves or sets the maximum number of members in a chat room.
object.MaxMembers[=value]
Part Description 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.
Returns zero if the limit is the server's default limit, or the maximum number of members otherwise.
Retrieves or sets the maximum number of characters allowed in the Send text box.
object.MaxMessageLength[=value]
Part Description 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.
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.
Retrieves the number of members currently in the user's chat room. This property is read-only.
object.MemberCount
Part Description object Required. An object expression that evaluates to a Chat control.
Returns zero if the user is not in a chat room, or the number of members in the chat room otherwise.
Retrieves the rating of a chat room. This property is read-only.
object.Rating
Part Description object Required. An object expression that evaluates to a Chat control.
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.
Retrieves the location of the chat room to which the user is currently connected. This property is read-only.
object.RoomPath
Part Description object Required. An object expression that evaluates to a Chat control.
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.
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.
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.
object.RoomTopic[=value]
Part Description object Required. An object expression that evaluates to a Chat control. value Optional. A BSTR value that indicates the topic name to be set.
Returns a BSTR value that contains the topic name of the chat room that the user is currently in.
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.
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.
object.State
Part Description object Required. An object expression that evaluates to a Chat control.
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
Retrieves the user's alias. This property is read-only.
object.ThisParticipantAlias
Part Description object Required. An object expression that evaluates to a Chat control.
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.
OnParticipantAliasChanged, ThisParticipantID, ThisParticipantName
Retrieves the user's numeric identifier. This property is read-only.
object.ThisParticipantID
Part Description object Required. An object expression that evaluates to a Chat control.
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.
Returns the user's Microsoft Windows® user name. This property is read-only.
object.ThisParticipantName
Part Description object Required. An object expression that evaluates to a Chat control.
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.
Contains flags that control the appearance of the default user interface. This property is a bitmask.
object.UIOption[=value]
Part Description 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.
Returns the sum of the option values currently selected.
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).
Appearance, BackColor, BorderStyle, History, MaxHistoryLength, MaxMessageLength
Returns or sets the width of the control in HiMetrics. Each HiMetrics unit corresponds to 0.01 millimeters. This property is persistent.
object.Width[=value]
Part Description object Required. An object expression that evaluates to a Chat control. value Optional. A HiMetrics value that indicates the width of the Chat control.
Returns the current width of the Chat control in HiMetrics units.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.