I recently used the ftp.dll, ok for general functionality,
however I am unable to animate a progress bar during an upload.
Is it possible to have a VB.net example or help?
I use this vb.net code, it doesn't seem to work:
AddHandler client.Progress, AddressOf Ftp_Progress
Private Sub InviaFile(ByVal mFile As String)
Bar.Value = 0
Dim fileStream As FileStream = Nothing
fileStream = File.Open( _
CurDir() & "\Invio_data\" & mFile, _
FileMode.Open)
Bar.Maximum = fileStream.Length
fileStream.Close()
If Not client.FileExists(mFile) Then
client.Upload( _
mFile, _
CurDir() & "\Invio_data\" & mFile)
End If
End Sub
Private Sub Ftp_Progress( _
ByVal sender As Object, _
ByVal e As ProgressEventArgs
If e.Percentage <> -1 Then
Bar.Value = CInt(e.Percentage)
End If
End Sub
thank you