You are here: MessengerYouLike.IMSDK > Tutorials > Block Unblock Friend Management > Unblock Friend
MessengerYouLike
Unblock Friend

How To Unblock a Friend

  1. Complete Login User

 

 

  1. Now Call the Asynchronous Method IMSDK.IMClient.BeginFriendBlockUnBlock

 

[Visual Basic]
Private Sub UnblockFriendToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UnblockFriendToolStripMenuItem.Click
        With tvwfriends.SelectedNode
            Try
                Dim fr As MessengerYouLike.IMSDK.Friends.MFriend

                If (.Text.ToString) = "" Then
                    Exit Sub
                End If

                fr = IMC.FindContactListFriend(.Tag.ToString)
                If fr Is Nothing Then
                    Exit Sub
                End If

                IMC.BeginFriendBlockUnBlock(fr.FriendUsername, False)

            Catch ex As Exception

            End Try
        End With
    End Sub

 

 

 

 

 

  1. When Friend is Unblocked the event IMSDK.IMClient.OnFriendUnBlocked is fired

 

[Visual Basic]
    Private Sub IMC_OnFriendUnBlocked(ByVal FriendUsername As String) Handles IMC.OnFriendUnBlocked
       Debug.WriteLine("Friend " & FriendUsername & " Unblocked")
    End Sub

 

 

 

 

  1. The friend being Unblocked is notified of this action via the event IMSDK.IMClient.OnFriendAMIUnBlocked

 

[Visual Basic]
Private Sub IMC_OnFriendAMIUnBlocked(ByVal FriendUsername As String) Handles IMC.OnFriendAMIUnBlocked
        Debug.WriteLine("You have been Unblocked by :" & FriendUsername)
End Sub
You are here: MessengerYouLike.IMSDK > Tutorials > Block Unblock Friend Management > Unblock Friend
Copyright (c) 2007. All rights reserved.