Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.8k views
in .NET FTP by (160 points)
I want to have a statusbar, but I can't show the transferred bytes.
Can anyone help me?

       internal void BytesTransferred(object obj, BytesTransferredEventArgs args) 
       {
          listBox2.Items.Add(args.ByteCount);
       }

       public delegate void BytesTransferredHandler(object sender, BytesTransferredEventArgs e);

       void connecting()
       {
       ftpConnection1.BytesTransferred += new BytesTransferredHandler(BytesTransferred);
       ftpConnection1.Connect();
       ...
       }


Greetz
Scheddy

3 Answers

0 votes
by (162k points)
You'll need a separate thread, try searching the forum for more info.
0 votes
by (160 points)
I have searched the forum, but i doesn't find a good answer :/
0 votes
by (162k points)
The ftp client must be run in a different thread to that of the status bar you are updating otherwise you won't see any updates.

Categories

...