Empower your application with a leading Instant Messenger .NET Software Development Kit
IMSDK.IMServer API IMSDK API Forums
Support Center » Knowledgebase » How to Change the Display Picture
 How to Change the Display Picture
Solution 1. Complete Login User





2. Now Call the Asynchronous function IMSDK.IMClient.UpdateDisplayPicture



[Visual Basic]
Private Sub llbChangeDisPic_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles llbChangeDisPic.LinkClicked
If OfdDisPic.ShowDialog = Windows.Forms.DialogResult.OK Then
IMC.UpdateDisplayPicture(OfdDisPic.FileName, 66, 63)
End If
End Sub









3. When Image is compressed and saved to the local Storage Resource then event IMSDK.IMClient.OnDisplayPictureUpdated is fired



[Visual Basic]
Private Sub IMC_OnDisplayPictureUpdated(ByVal ImagePath As String) Handles IMC.OnDisplayPictureUpdated
'Get The Loggedin user Display picture if any
If Not String.IsNullOrEmpty(IMC.GetDisplayPicture) Then
picUserDisPic.ImageLocation = IMC.GetDisplayPicture
End If
End Sub







4. All Online Friends are notified of this changed via the event IMSDK.IMClient.OnFriendDisplayPictureUpdated



[Visual Basic]
Private Sub IMC_OnFriendDisplayPictureUpdated(ByVal FriendUsername As String, ByVal DisplayPicturePath As String) Handles IMC.OnFriendDisplayPictureUpdated
Debug.WriteLine("Friend :" & FriendUsername & " Display picture Updated")
End Sub



Article Details
Article ID: 5
Created On: 14 Apr 2007 01:20 AM

 This answer was helpful  This answer was not helpful

 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Downloads
Language: