event ObjectSelect (Object as ExShellObject)
Fired when the user selects a new object for browsing.

 TypeDescription 
   Object as ExShellObject A reference to the ExShellObject being selected.  
This event is fired when the user double-clicks or presses Enter key on any object in the browser. By default, if a folder item is being double clicked, the folder gets browsed. If a file is being double clicked, nothing is happen. Use the CancelObjectSelect method to prevent opening or browsing the folder being double clicked ( or any other type of object ).

The following VB sample prevents opening a zip file ( which is considered a folder item ):

Private Sub ExShellView1_ObjectSelect(ByVal Object As EXSHELLVIEWLibCtl.IExShellObject)
    If Object.Name Like "*.zip" Then
        ExShellView1.CancelObjectSelect
    End If
End Sub


Send comments on this topic.
© 1999-2011 Exontrol.COM, Software. All rights reserved.