But this will be outside the thread, where you can't refer to the ftp operation that is running in the thread -
Private Sub BtnDownload_Click(ByVal sender As Object, ByVal e As EventArgs) _
Handles _BtnDownload.Click
Dim thread As New Thread(AddressOf BackgroundThread)
thread.Start()
End Sub
Private Sub BackgroundThread()
Try
Using ftp As New Ftp()
ftp.Connect("ftp-loc")
ftp.Login("login", "password")
ftp.Download(path-of-one-big-file)
ftp.Close()
End Using
Catch ex As Exception
End Try
End Sub
Private Sub Btn_Stop_Click(sender As System.Object, e As System.EventArgs) _
Handles Btn_Stop.Click
' What goes here? Not Ftp.Abort() as this can't work ...
End Sub
??