Contents Index Topic Contents | ||
Previous Topic: OnMemberPropertyChanged Event Next Topic: OnPrivateMessage Event |
OnMessage Event
Fires when a member sends a message to the channel or members of the channel including the control user.
Syntax
object_OnMessage(Channel, SenderNickname, MessageType, Message, RecipientNicknames, DataMessageTag)
Parameters
object Required. An object expression that evaluates to an MsChatPr control. Channel Required. An object expression that evaluates to a Channel object. SenderNickname Required. A string expression that contains the Nickname of the sender. MessageType Required. A long integer of enumMessageType type. Message Required. A variant. When the data message is received and the msgtDataRaw flag is not set, the Message parameter can be a number, a string, an array of numbers, an array of strings, or an array of variants that are strings or numbers. This is exactly like the Message parameter used in the SendMessage method. However, when the msgtDataRaw flag is set, the Message parameter is an array of these three variants:
Message[0] The postprocessed string that represents the array of bytes received. Message[1] An array of bytes. Message[2] An array of variants that are bytes. RecipientNicknames Required. An array of variants that are strings when the incoming message is a whisper (that is, that originates from the SendMessage call that uses the msgtWhisper type). RecipientNicknames is a string containing the user's nickname when the message is a multicasted data message (that is, a data message that was sent to one or more channel members including the control user). This differentiates the data messages that were sent to the channel where RecipientNicknames is an empty variant and those that were sent to channel member(s). RecipientNicknames is an empty variant in all other cases.
DataMessageTag Required. A variant. Empty when the Message parameter is a string, and must be a string expression when Message is data.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.