![]() | Type | Description | ||
| Object as ExShellObject | A reference to the ExShellObject being selected. |
In case your control supports single selection, you can use the ObjectSelected event to notify when a new item/object is selected:
Private Sub ExShellView1_ObjectSelected(ByVal Object As EXSHELLVIEWLibCtl.IExShellObject)
If Not (Object Is Nothing) Then
Debug.Print Object.Name
End If
End Sub
The following sample gets a collection of selected items ( in case your control allows multiple selection ):
Private Sub ExShellView1_StateChange(ByVal newState As EXSHELLVIEWLibCtl.StatesEnum)
If (newState = SelChangeState) Then
ExShellView1.Objects.Get SelectedItems
With ExShellView1.Objects
For i = 0 To .Count - 1
Debug.Print .Item(i).Name
Next
End With
End If
End Sub