daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Dec 29th, 2016 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class FileSharingForm
  2. Private FTPDownloader As New Utilities.FTP.FTPclient
  3.  
  4. Private Sub FileSharingForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  5.     btnChangeDirectory.Enabled = False
  6.     FTPDownloader.Hostname = txtServer.Text.Trim
  7.     FTPDownloader.Username = txtUsername.Text
  8.     FTPDownloader.Password = txtPassword.Text
  9. End Sub
  10.  
  11. Private Sub btnHomeDirectory_Click(sender As Object, e As EventArgs) Handles btnHomeDirectory.Click
  12.     FTPDownloader.CurrentDirectory = "/"
  13.     RefreshList()
  14. End Sub
  15.  
  16. 'important: add items to listbox
  17. Private Sub RefreshList()
  18.     ListFTPFiles.Items.Clear()
  19.     Try
  20.         For Each file In FTPDownloader.ListDirectoryDetail()
  21.             ListFTPFiles.Items.Add(file.Filename)
  22.         Next
  23.     Catch ex As Exception
  24.         MessageBox.Show(ex.Message)
  25.     End Try
  26. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top