The ExShellView component provides a file list view similar to the right pane of Windows Explorer. Its appearance and behavior replicate Windows Explorer within an application form, offering a familiar file browsing experience. ExShellView can be used together with ExFolderView to build applications with full or partial Explorer-style functionality. It supports file filtering through the FilePattern property, and for more advanced control, it triggers an event for each item before display, allowing dynamic decisions on which items are shown.
The control does not have a built-in ExploreFromHere method, but you can implement similar functionality by using the BrowseFolder property and handling the KeyDown event to restrict navigation.
The following sample code demonstrates how to set the initial folder and disable the Backspace key when the user is at a certain level in the folder hierarchy:
Private Sub ExShellView1_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = vbKeyBack) Then
If (ExShellView1.BrowseFolder.Path < "\\tsclient") Then
KeyCode = 0
End If
End If
End Sub
Private Sub Form_Load()
ExShellView1.BrowseFolder = "\\tsclient\d\users"
End Sub
The sample initially browses the \\tsclient\d\users folder (a network folder) and disables the Backspace key when the control's BrowseFolder property is set to \\tsclient. In other words, the user cannot navigate above the \\tsclient network folder.
Because of the UAC, and the Shell runs with standard user permissions, it can't see mapped drives which were configured by your application running with admin rights.
So, try the following workaround step by step:
Click Start, type regedit in the Start programs and files box, and then press ENTER.
Locate and then right-click the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.
Point to New, and then click DWORD Value.
Type EnableLinkedConnections, and then press ENTER.
Right-click EnableLinkedConnections, and then click Modify.