Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 26th, 2004, 09:38 PM
Authorized User
 
Join Date: Jun 2003
Location: Makati City, , Philippines.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Dhodie
Default progress bar while getting file from FTP

Hello!

I am trying to get a file from a FTP site, i cant seem
to know how iam going to reflect the percentage of the downloaded file. I wanted it to be shown via progress bar. Any idea?

-Dhodie


  #2 (permalink)  
Old October 27th, 2004, 01:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if the size of the original file is not known, instead of a progress bar you can display the amount of data read in a label in a second-based interval, so the user knows that something is going on, like "Downloaded 10.7KB..."
  #3 (permalink)  
Old October 27th, 2004, 08:42 PM
Authorized User
 
Join Date: Jun 2003
Location: Makati City, , Philippines.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Dhodie
Default

Hi Marco,

Downloading file from FTP is just one part of one big process. After downloading the file, the application will do another task like converting the downloaded file (a text file) into recordset
then loop thru that and validate some values and so on. I have previously created a progressbar and reflected the percentage completion as i loop thru the recordset, now I wanted to include the process of getting the file from FTP to the progress bar. The processes are as follows:

- Get the file from FTP
- Convert downloaded file to a recordset
- Loop thru recordset to validate some values

I have used FTPGetFile API but this does not return any status of the process. Any idea?

Thanks.

-Dhodie

  #4 (permalink)  
Old October 28th, 2004, 02:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

for what you want to do FTPGetFile is too much high level.
You can use FTPOpenFile, FTPGetFileSize, and InternetReadFile (using the last one asynchronously you can display a progress bar). More coding, more control...

Marco
  #5 (permalink)  
Old October 28th, 2004, 10:15 PM
Authorized User
 
Join Date: Jun 2003
Location: Makati City, , Philippines.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Dhodie
Default


Hi Marco,

I'll play around with
FTPOpenFile, FTPGetFileSize, and InternetReadFile.

Thanks for the reply.

-dhodie



Similar Threads
Thread Thread Starter Forum Replies Last Post
Text File and Progress bar ricespn .NET Framework 1.x 1 October 2nd, 2008 09:03 PM
Help me to show progress bar during file upload subhasps8 ASP.NET 2.0 Professional 5 June 27th, 2007 06:39 PM
upload file, progress bar ivris Servlets 0 July 21st, 2004 06:52 AM
upload file, progress bar ivris J2EE 0 July 21st, 2004 06:52 AM
Progress Bar BSkelding ASP.NET 1.0 and 1.1 Basics 3 May 4th, 2004 04:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.