property ExFileView.BrowseFolderPath as String

Retrieves or sets the browsed folder path.

TypeDescription
String A string expression that defines the browsed folder path.

Use the BrowseFolderPath to change the browsed folder. Call the ExploreFromHere property to set the folder that's the root of the control. The ExploreFromHere property sets also the BrowseFolderPath to the newly root folder. Use "" (empty string ) to browse "My computer" folder. The BrowseFolderPath property has no effect (returns empty string), if the control's ExploreFromHere property includes |, > or \r\n characters (shortly the BrowseFolderPath property has no effect if the control display multiple root-folders).

The control fires the StateChange event when the user changes the browsed path. The images collection is updated each time a new folder is browsed. Use the LoadIcon or LoadIcons method to add new icons to the control. Use the AutoUpdate and ChangeNotification properties to update the control's content when changes occur in the browsed folder. Use the Expand method to programmatically expand a folder giving its path.

If changing the folder fails, the BrowseFolderPath property fires the exception "The BrowseFolderPath property isn't a valid path or the path is not derived from ExploreFromHere.". In order to prevent the exception you can on error handler like in the following samples:

On Error Resume Next
With ExFileView1
    .ExploreFromHere = "\\tsclient"
    .BrowseFolderPath = "D\Users\Mihai"
End With

or in VFP:

ON ERROR return
with thisform.exFileView1
    .ExploreFromHere = "\\tsclient"
    .BrowseFolderPath = "D\Users\Mihai"
endwith

The following VB sample changes the browsed folder:

With ExFileView1
    .BrowseFolderPath = "C:\Temp"
End With

The following C++ sample changes the browsed folder:

m_fileview.SetBrowseFolderPath( "C:\\Temp" );

The following VB.NET sample changes the browsed folder:

With AxExFileView1
    .BrowseFolderPath = "c:\temp"
End With

The following C# sample changes the browsed folder:

axExFileView1.BrowseFolderPath = "c:\\temp";

The following VFP sample changes the browsed folder:

With thisform.ExFileView1
    .BrowseFolderPath = "c:\temp"
EndWith