Empower your application with a leading Instant Messenger .NET Software Development Kit
IMSDK.IMServer API
IMSDK API
Forums
Home
/ Support
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
User Comments
Add a Comment
Sharing is good. So if you have a comment about this entry please feel free to share. The Comments might be reviewed by our Staff and might require approval before being posted. Questions posted will not be answered, please submit a ticket for support requests.
Fullname:
Email: (Optional)
Comments:
Login
[Lost Password]
Email:
Password:
Remember Me:
Search
-- Entire Support Site --
Knowledgebase
Downloads
Article Options
Add Comment
Print Article
PDF Version
Email Article
Add to Favorites
Home
|
Register
|
Submit a Ticket
|
Knowledgebase
|
Downloads
Language:
English (U.S.)