You are here: MessengerYouLike.IMSDK > Tutorials > Groups Management > Remove Group
MessengerYouLike
Remove Group

How to remove group

  1. Complete Login User

 

 

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

 

[Visual Basic]
Private Sub DeleteGroupToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteGroupToolStripMenuItem.Click
        Dim fr As MessengerYouLike.IMSDK.Friends.MFriend

        Try

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

        Catch ex As Exception
            Exit Sub

        End Try

        IMC.BeginRemoveGroup(tvwfriends.SelectedNode.Tag.ToString)


    End Sub

 

 

 

 

  1. If Group removed Successfully then event IMSDK.IMClient.OnGroupRemoved is fired

 

[Visual Basic]
Private Sub IMC_OnGroupRemoved(ByVal GroupName As String) Handles IMC.OnGroupRemoved
        Debug.WriteLine("Group : " & GroupName & " Removed")
End Sub

 

 

 

 

  1. If GroupID is Specified incorrectly the no Group will be Found to remove and event IMSDK.IMClient.OnNoGroupFoundToRemove will be fired

 

[Visual Basic]
Private Sub IMC_OnNoGroupFoundToRemove(ByVal GroupID As String) Handles IMC.OnNoGroupFoundToRemove
        Debug.WriteLine("Invalid Group UID Specified : " & GroupID)
End Sub
You are here: MessengerYouLike.IMSDK > Tutorials > Groups Management > Remove Group
Copyright (c) 2007. All rights reserved.