The common OpenFileDialog
, SaveFileDialog
or FolderBrowserDialog
(from System.Windows.Forms
namespace) cannot be used for browsing files on remote FTP server.
You have to design your own dialog with a System.Windows.Forms.ListView
control or with some custom list control.
Then fill it with a list of files and directories, which you can obtain from a FTP server using the Ftp.GetList
method.
Here is a very simple sample:
' get a list of items from current FTP directory'
Dim list = client.GetList()
' fill the items into a listView GUI control '
For Each item In list
Dim name As String
name = item.Name
If item.IsDirectory Then
name = name & "\"
End If
listView.Items.Add(name)
Next
For a more advanced sample, see the WinFormClient sample project (part of samples installed with the Rebex FTP/SSL component).