Our Products:
CompleteFTP
edtFTPnet/Free
edtFTPnet/PRO
edtFTPj/Free
edtFTPj/PRO
Login
Remember
Google Login
Register
All Activity
Questions
Hot!
Unanswered
Tags
Categories
Ask a Question
Ask a Question
Progress bar
0
votes
4.8k
views
asked
May 11, 2006
in
.NET FTP
by
revello
(
200
points)
Hi,
I have a big problem on implement a progress bar during the upload of a file on the server. :oops:
I need create the progress bar in a Vb.NET application where I have implemented the ftp function.
Someone can give me an exemple on how create a progress bar? I use the free ftp library
Thank you very much for the help
Gianluigi - Italy
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
5
Answers
0
votes
answered
May 11, 2006
by
Boz
(
700
points)
Add a progress bar to your form. Run the ftp client in a separate thread and attach to the bytes transfered event. When the event fires, update the progress bar.
Please
log in
or
register
to add a comment.
0
votes
answered
May 11, 2006
by
revello
(
200
points)
HI,
Thank you for the response,
may you give me an exemple?
I'm not very expert with "separate thread ", what is exactly?
Thank you
Gianluigi
Please
log in
or
register
to add a comment.
0
votes
answered
May 11, 2006
by
Boz
(
700
points)
Well, first you need to learn about threading. A quick google search turned up a bunch of good informational articles about threading in VB.NET. Here's a good one to use as a starting point:
http://www.devx.com/getHelpOn/10MinuteSolution/20365
. After reading through and understanding that article, then setup a thread in your app whose soul purpose is to do your file transfers over the ftp connection. That thread will be tranferring and firing off your bytes transfered event. The event code updates your progress bar that is running in your main thread. I hope that helps. I don't have a good specific example in vb as I typically use C#, but that article talks about threading in vb, so it should get you going in the right direction.
Please
log in
or
register
to add a comment.
0
votes
answered
May 11, 2006
by
revello
(
200
points)
Hi,
May you send me en exemple in C#?
I'm able to read the C#
Thank you very much for your help
Gianluigi
Please
log in
or
register
to add a comment.
0
votes
answered
May 11, 2006
by
EDT Support
(
51.6k
points)
Just so you know, edtFTPnet/PRO 2.0 has just been released. It features ProFTPConnection which supports asynchronous methods that make it a lot easier to do things like progress bars since you don't need to worry about using separate threads. You simply handle the BytesTransferred event in your form and launch your download using BeginDownloadFile() instead of DownloadFile(). BeginDownloadFile() returns control to the caller immediately and downloads the file in the background. You can download a 30-day trial from
http://www.enterprisedt.com/products/edtftpnetpro/download.html
.
- Hans (EDT Support)
Please
log in
or
register
to add a comment.
Categories
All categories
Products
(2.8k)
CompleteFTP
(418)
Java FTP
(1k)
.NET FTP
(1.4k)
FAQ
(120)
General
(178)
Feature Requests
(21)
...