method Items.RemoveItem (Item as HITEM)

Removes a specific item.

TypeDescription
Item as HITEM A long expression that indicates the handle of the item being removed.
The RemoveItem method removes a specific item from the collection. The RemoveItem method doesn't remove recursively the item. To remove all items in the collection you can use RemoveAllItems method. The RemoveItem method doesn't remove recursively the item. 

The following VB sample removes recursively an item:

Private Sub RemoveItemRec(ByVal g As EXPLORERTREELibCtl.Group, ByVal h As EXPLORERTREELibCtl.HITEM)
    With g.Items
        g.BeginUpdate
        If (.ChildCount(h) > 0) Then
            Dim hChild As HITEM
            hChild = .ItemChild(h)
            While (hChild <> 0)
                Dim hNext As HITEM
                hNext = .NextSiblingItem(hChild)
                RemoveItemRec g, hChild
                hChild = hNext
            Wend
        End If
        .RemoveItem h
        g.EndUpdate
    End With
End Sub