Re: Progress Bar for Download
- From: NevilleT <NevilleT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Jul 2009 16:40:01 -0700
Lots of good information here. Thanks guys. I think Stuart has hit on the
same problem I came up against in the refresh. Don't want to tie the system
up with a timer or running continuous updates. Will continue to play with it
and see what I come up with. If it is useful I will post it. Also check
back after Sunday to see if Stuart was able to post another option.
Thanks guys
"Stuart McCall" wrote:
"NevilleT" <NevilleT@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message.
news:A696C7A4-5A00-44FE-9DCA-7F992A952AFD@xxxxxxxxxxxxxxxx
Just about created an automatic upgrade function to check if a new version
of
the program is available, download and install it. I am downloading a
file
from the Internet using:
Public Declare Function URLDownloadToFile Lib "urlmon" Alias
"URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long _
) As Long
lngRetVal = URLDownloadToFile(0, strURL, strNewFileNameIncPath, 0, 0)
'
Download the new file
All works fine however the download takes a few minutes. What I would
like
to do is to display a progress bar. Has anyone seen this done in Access?
The problem you'll run into with anyone's progress bar is that they need to
be regularly updated by the function doing the work (or using a timer -
ugh!), and URLDownloadToFile won't do it for you. It will call a callback
function, but callbacks tend to cause trouble with the Access VBA
environment. Not worth the trouble for a simple 'busy' dialog. After all,
all the user needs to know is that a download is taking place and that the
program hasn't 'hung'. You could however try to find a 'bounce bar' (a la
the windows startup screen) form or control via Google. The advantage of
this type of dialog is that it doesn't need to know the file size and
doesn't need updating.I have one of these but it's tied in to a large app at
the moment. I've been meaning to break it out and make a download available
on my site (which Jack Leach kindly pointed you to). Maybe this is the right
time to do that, but if I do it won't be till at least Sunday.
- Follow-Ups:
- Re: Progress Bar for Download
- From: Stuart McCall
- Re: Progress Bar for Download
- References:
- Progress Bar for Download
- From: NevilleT
- Re: Progress Bar for Download
- From: Stuart McCall
- Progress Bar for Download
- Prev by Date: Re: LAST in a Totals Query
- Next by Date: Re: Access 2007 conversion subforms don't display linked records
- Previous by thread: Re: Progress Bar for Download
- Next by thread: Re: Progress Bar for Download
- Index(es):
Relevant Pages
|
Loading