Home

  About me

  Links

  Contact me

  Disclaimer

  Impressum

Products


  - mv_Menu

  - Color-TV

  - db-Mutex

  - Form-Factor

  - OL-Plus package

  - URL-Download

  - Drop-Target

  - VdB_Mail

Download-Form with progressbar  (latest version 13-01-2004)

What :   This is a small custom form, that can be used to download lengthy files from any given URL address. Embedded in the form is a progress bar, that informs the user of the current state of the download.

How :   The Download-Progressbar class uses the UrlDownloadToFile API Function, which  is able to involve a callback-function, that is used to control the  native dBase progress bar. (The class needs a special dll-file, for the callback mechanism)

Usage:

       set procedure to urld.cc additive

       f=new dwnldcnt("url-address","filename")

       f.readmodal( )

That' s all. You specify the internet address and the filename where you want to save the downloaded file. The download is started in the onopen-event of the form, so with the readmodal( ) method, you trigger the download. After completion  (or failure), the property errorcode contains the status of the download. 
Including code from Bernd Hohenester, to make sure that the files are not loaded from the cache.

Because the progress bar is a native dbase control, you can easily adopt it to your needs (see J-P Martel's good looking thing <g>)   

The ZIP-File contains the urld.cc, progresscallback.dll and a demoform, that gets the dbaseuserguide from the dBase site. 

 

Web site and all contents © Copyright Marc Van den Berghen 2008, All rights reserved.