473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

how to use inet.execute to download a file

I have tried several times to get inet.execute to download a file with the
icHTTP protocol without much success so far.

I execute:

Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"

monitor the progress in

Inet_StateChanged(ByVal State ByVal Integer)

looking for State = icResponseCompleted

I consistantly get State = 9 - and no downloaded file

Does anyone have a bit of code/advice to get this to work. I am currently
using the Inet.OpenURL method
which works fine but does not allow you to display download progress.

Soeren
Jul 17 '05 #1
4 13864
How about using IE's built in method including the Save As and progress
dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm (this
works for http as well as ftp files). The code includes a means to set the
Save As path to a location of your choice, then restore the user's default
Save As path for subsequent use with IE. This way the user's settings are
not adversely affected by the code, and his next download using IE will
offer to save to the location he is accustomed to.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.dk> wrote in message
news:40*********************@dread12.news.tele.dk. ..
: I have tried several times to get inet.execute to download a file with the
: icHTTP protocol without much success so far.
:
: I execute:
:
: Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
:
: monitor the progress in
:
: Inet_StateChanged(ByVal State ByVal Integer)
:
: looking for State = icResponseCompleted
:
: I consistantly get State = 9 - and no downloaded file
:
: Does anyone have a bit of code/advice to get this to work. I am currently
: using the Inet.OpenURL method
: which works fine but does not allow you to display download progress.
:
: Soeren
:
:

Jul 17 '05 #2
Thanks a lot Randy, I'll try this solution. There may, however, be a
copyright problem as the code is to be included in a distributed application
(software package for analysis of nucleotide and protein sequences,
www.seqtools.dk) which seems to be in conflict with the copyright notice of
the code.

Cheers Soeren

"Randy Birch" <rg************@mvps.org> wrote in message
news:ff******************@news04.bloor.is.net.cabl e.rogers.com...
How about using IE's built in method including the Save As and progress
dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm (this works for http as well as ftp files). The code includes a means to set the Save As path to a location of your choice, then restore the user's default
Save As path for subsequent use with IE. This way the user's settings are
not adversely affected by the code, and his next download using IE will
offer to save to the location he is accustomed to.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.dk> wrote in message
news:40*********************@dread12.news.tele.dk. ..
: I have tried several times to get inet.execute to download a file with the : icHTTP protocol without much success so far.
:
: I execute:
:
: Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
:
: monitor the progress in
:
: Inet_StateChanged(ByVal State ByVal Integer)
:
: looking for State = icResponseCompleted
:
: I consistantly get State = 9 - and no downloaded file
:
: Does anyone have a bit of code/advice to get this to work. I am currently : using the Inet.OpenURL method
: which works fine but does not allow you to display download progress.
:
: Soeren
:
:

Jul 17 '05 #3
Oh no .. you can use it as you see fit. The notice is only for leverage for
those few instances where I have to chase down people who have reproduced
the site as their own. Having the notice posted makes the ISPs really sit up
and take notice. Other than one korean site, I've had perfect success with
this. And I've fixed the korean site so visitors there know the story. <g>

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.dk> wrote in message
news:40*********************@dread14.news.tele.dk. ..
: Thanks a lot Randy, I'll try this solution. There may, however, be a
: copyright problem as the code is to be included in a distributed
application
: (software package for analysis of nucleotide and protein sequences,
: www.seqtools.dk) which seems to be in conflict with the copyright notice
of
: the code.
:
: Cheers Soeren
:
: "Randy Birch" <rg************@mvps.org> wrote in message
: news:ff******************@news04.bloor.is.net.cabl e.rogers.com...
: > How about using IE's built in method including the Save As and progress
: > dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm
: (this
: > works for http as well as ftp files). The code includes a means to set
: the
: > Save As path to a location of your choice, then restore the user's
default
: > Save As path for subsequent use with IE. This way the user's settings
are
: > not adversely affected by the code, and his next download using IE will
: > offer to save to the location he is accustomed to.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "S.W. Rasmussen" <sw*@seqtools.dk> wrote in message
: > news:40*********************@dread12.news.tele.dk. ..
: > : I have tried several times to get inet.execute to download a file with
: the
: > : icHTTP protocol without much success so far.
: > :
: > : I execute:
: > :
: > : Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
: > :
: > : monitor the progress in
: > :
: > : Inet_StateChanged(ByVal State ByVal Integer)
: > :
: > : looking for State = icResponseCompleted
: > :
: > : I consistantly get State = 9 - and no downloaded file
: > :
: > : Does anyone have a bit of code/advice to get this to work. I am
: currently
: > : using the Inet.OpenURL method
: > : which works fine but does not allow you to display download progress.
: > :
: > : Soeren
: > :
: > :
: >
:
:

Jul 17 '05 #4
I just implemented the IE based download feature - its fairly simple, and
not least works perfectly. Thanks a lot...

Cheers, Soeren
"Randy Birch" <rg************@mvps.org> wrote in message
news:NZ********************@news01.bloor.is.net.ca ble.rogers.com...
Oh no .. you can use it as you see fit. The notice is only for leverage for those few instances where I have to chase down people who have reproduced
the site as their own. Having the notice posted makes the ISPs really sit up and take notice. Other than one korean site, I've had perfect success with
this. And I've fixed the korean site so visitors there know the story. <g>

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"S.W. Rasmussen" <sw*@seqtools.dk> wrote in message
news:40*********************@dread14.news.tele.dk. ..
: Thanks a lot Randy, I'll try this solution. There may, however, be a
: copyright problem as the code is to be included in a distributed
application
: (software package for analysis of nucleotide and protein sequences,
: www.seqtools.dk) which seems to be in conflict with the copyright notice
of
: the code.
:
: Cheers Soeren
:
: "Randy Birch" <rg************@mvps.org> wrote in message
: news:ff******************@news04.bloor.is.net.cabl e.rogers.com...
: > How about using IE's built in method including the Save As and progress : > dialogs .... http://vbnet.mvps.org/code/internet/...ledownload.htm
: (this
: > works for http as well as ftp files). The code includes a means to set : the
: > Save As path to a location of your choice, then restore the user's
default
: > Save As path for subsequent use with IE. This way the user's settings
are
: > not adversely affected by the code, and his next download using IE will : > offer to save to the location he is accustomed to.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "S.W. Rasmussen" <sw*@seqtools.dk> wrote in message
: > news:40*********************@dread12.news.tele.dk. ..
: > : I have tried several times to get inet.execute to download a file with : the
: > : icHTTP protocol without much success so far.
: > :
: > : I execute:
: > :
: > : Inet.Execute "http://www.domain/myfolder/myfile.file", "GET"
: > :
: > : monitor the progress in
: > :
: > : Inet_StateChanged(ByVal State ByVal Integer)
: > :
: > : looking for State = icResponseCompleted
: > :
: > : I consistantly get State = 9 - and no downloaded file
: > :
: > : Does anyone have a bit of code/advice to get this to work. I am
: currently
: > : using the Inet.OpenURL method
: > : which works fine but does not allow you to display download progress. : > :
: > : Soeren
: > :
: > :
: >
:
:

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Laphan | last post by:
Hi All Just wanted to know if anybody knows the answer to the following quick queries: 1) The reason I'm using VB's INET control is to download copies of Ms Access DBs on a range of web sites...
0
by: Laphan | last post by:
I know this is a crosspost, but I need to know which is the best one for posting INET FTP queries, so that I'm not cross-posting in future. Now that I've posted could somebody let me know: 1)...
2
by: Kapish Kalda | last post by:
Hi, I am using Inet AcitveX to download a file form Http.(code below) but couldnot able to download. The file size is about 2MB. Please Suggest. Thanks Code Private Sub Command1_Click()
0
by: dartszeeland.tk | last post by:
Hi, i want to upload a file from my computer to a ftp..... this is the code: Inet.RemoteHost = "localhost" '(not ftp:// in front of it) Inet.RemotePort = "21" Inet.UserName = "user"...
0
by: Tom Libby | last post by:
I have a control that is based on the Inet control it has a httppost method which is below. During development everything works fine but after I build an exe the StillExecting property is not being...
3
by: danny relic | last post by:
Is it possible for inet to access a webpage, fill out post data, and then do another action afterwards? How would I do that? For instance, I've got inet accessing a site where it needs to do a...
1
by: pbak | last post by:
Hai! I am working with INET Control in Vb(Internet transfer Control) Actual Domain Recieving Data from Weighing Scale I connected Weighing Scale to PC using Cross network...
0
by: mohamed82 | last post by:
Hi all,i m trying to download zip file from the site.following coding to use download at the time runtime error will cause "Unable to Complete Your Request" after clik the debug window error will...
0
by: mohamed82 | last post by:
Hi all,i m trying to download zip file from the site.following coding to use download at the time runtime error will cause "Unable to Complete Your Request" after clik the debug window error will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.