Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class FileSharingForm
- Private FTPDownloader As New Utilities.FTP.FTPclient
- Private Sub FileSharingForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- btnChangeDirectory.Enabled = False
- FTPDownloader.Hostname = txtServer.Text.Trim
- FTPDownloader.Username = txtUsername.Text
- FTPDownloader.Password = txtPassword.Text
- End Sub
- Private Sub btnHomeDirectory_Click(sender As Object, e As EventArgs) Handles btnHomeDirectory.Click
- FTPDownloader.CurrentDirectory = "/"
- RefreshList()
- End Sub
- 'important: add items to listbox
- Private Sub RefreshList()
- ListFTPFiles.Items.Clear()
- Try
- For Each file In FTPDownloader.ListDirectoryDetail()
- ListFTPFiles.Items.Add(file.Filename)
- Next
- Catch ex As Exception
- MessageBox.Show(ex.Message)
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement