You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > IMClient Class > IMClient Events > IMClient.OnMessageReceived Event
MessengerYouLike
IMClient.OnMessageReceived Event

When Message is Successfully received

C#
public event OnMessageReceived;
Visual Basic
Public Event OnMessageReceived(ByVal From As String, ByVal Message As String)
Return Values 
Description 
ByVal From As String 
Username of friend who sent the message 
ByVal Message As String 
Message that was received 

when sub IMSDK.IMClient.BeginSendMessage is called to send a message then the server sent's a message to the friend when the friends received the message this events is fired in friends IMClient which gives access to the message

    [Visual Basic]
 Private Sub MC_OnMessageReceived(ByVal From As String, ByVal Message As String) Handles MC.OnMessageReceived
     Debug.WriteLine(From & " Sent a Message " & Message)
    End Sub
Copyright (c) 2007. All rights reserved.