473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

downloading files with IE built-in method...

Handling file downloading with Randy Birch very nice code
(http://vbnet.mvps.org/code/internet/...ledownload.htm)
raises a second question:

I my case, the user should not be allowed to change the save destination for
the downloaded file. Does anyone know if it is possible to circumvent the
save dialogbox, for example by hiding it, or by auto-clicking the save
command button on the dialogbox closing the box with the destination path
without user intervention?

Cheers, Soeren
Jul 17 '05 #1
3 3706
Private 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
Public Function DownloadFile(URL As String, LocalFilename As String) As
Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub Form_Load()
'example by Matthew Gates (Pu*****@hotmail.com)
DownloadFile "http://www.allapi.net", "c:\allapi.htm"
End Sub

S.W. Rasmussen heeft geschreven in bericht
<40*********************@dread11.news.tele.dk>.. .
Handling file downloading with Randy Birch very nice code
(http://vbnet.mvps.org/code/internet/...ledownload.htm)
raises a second question:

I my case, the user should not be allowed to change the save destination forthe downloaded file. Does anyone know if it is possible to circumvent the
save dialogbox, for example by hiding it, or by auto-clicking the save
command button on the dialogbox closing the box with the destination path
without user intervention?

Cheers, Soeren

Jul 17 '05 #2
But he want's an interface.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Slaatje" <So******@mail.com> wrote in message
news:c6**********@reader08.wxs.nl...
: Private 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
: Public Function DownloadFile(URL As String, LocalFilename As String) As
: Boolean
: Dim lngRetVal As Long
: lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
: If lngRetVal = 0 Then DownloadFile = True
: End Function
: Private Sub Form_Load()
: 'example by Matthew Gates (Pu*****@hotmail.com)
: DownloadFile "http://www.allapi.net", "c:\allapi.htm"
: End Sub
:
:
:
: S.W. Rasmussen heeft geschreven in bericht
: <40*********************@dread11.news.tele.dk>.. .
: >Handling file downloading with Randy Birch very nice code
: >(http://vbnet.mvps.org/code/internet/...ledownload.htm)
: >raises a second question:
: >
: >I my case, the user should not be allowed to change the save destination
: for
: >the downloaded file. Does anyone know if it is possible to circumvent the
: >save dialogbox, for example by hiding it, or by auto-clicking the save
: >command button on the dialogbox closing the box with the destination path
: >without user intervention?
: >
: >Cheers, Soeren
: >
: >
:
:

Jul 17 '05 #3
Perhaps I should be a bit more specific: Randy Birch suggestion (code to be
found at: http://vbnet.mvps.org/code/internet/...ledownload.htm) works
absolutely fine displaying a progressbar and downloading details. My
question was if it is possible to prevent the user from changing the
download save destination by hiding or auto-closing the save-dialogbox
before the user has a change to change it.

Cheers, Soeren

"Randy Birch" <rg************@mvps.org> wrote in message
news:7e********************@twister01.bloor.is.net .cable.rogers.com...
But he want's an interface.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Slaatje" <So******@mail.com> wrote in message
news:c6**********@reader08.wxs.nl...
: Private 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
: Public Function DownloadFile(URL As String, LocalFilename As String) As
: Boolean
: Dim lngRetVal As Long
: lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
: If lngRetVal = 0 Then DownloadFile = True
: End Function
: Private Sub Form_Load()
: 'example by Matthew Gates (Pu*****@hotmail.com)
: DownloadFile "http://www.allapi.net", "c:\allapi.htm"
: End Sub
:
:
:
: S.W. Rasmussen heeft geschreven in bericht
: <40*********************@dread11.news.tele.dk>.. .
: >Handling file downloading with Randy Birch very nice code
: >(http://vbnet.mvps.org/code/internet/...ledownload.htm)
: >raises a second question:
: >
: >I my case, the user should not be allowed to change the save destination : for
: >the downloaded file. Does anyone know if it is possible to circumvent the : >save dialogbox, for example by hiding it, or by auto-clicking the save
: >command button on the dialogbox closing the box with the destination path : >without user intervention?
: >
: >Cheers, Soeren
: >
: >
:
:

Jul 17 '05 #4

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

Similar topics

1
by: Havic Ploccin | last post by:
First question, is this possible? If so, can somebody please give me some tips on where I can get the CAB files etc? Second question, I would like to prevent downloading some other ActiveX...
5
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting...
2
by: Bala | last post by:
Hi I am trying to download the PDF files from my webserver using ASP.Net. All my files are stored at F Drive on webserver. Like this F:\Main Folder\Sub Folder\Files\File1.pdf I am...
0
by: just.starting | last post by:
I am having problem while downloading files from an apache server2.0.53 with php4.3.10.While downloading some files it generally stops after downloading some specific amount and then stops...
10
by: mwt | last post by:
This code works fine to download files from the web and write them to the local drive: import urllib f = urllib.urlopen("http://www.python.org/blah/blah.zip") g = f.read() file =...
1
by: tshad | last post by:
I have some code to allow me to send text files to my user. I am not allowing them to view my directory. I am just downloading a file they previously requested, which works some of the time. ...
8
by: danish | last post by:
Hi, Can anyone suggest me why some .php files are downloading and some are executing. Ive got php 5.2.0 and apache 2.0.54. Apache came as an rpm along with Fedora 4. I downloaded php from the site...
4
by: c83 | last post by:
I am using Active Perl, and i-am having problems downloading files from internet because of the proxy. The script is workin when no proxy is present, but now it refuses to download files. Here is...
1
by: getin4bob | last post by:
Please provide me with the asp.net C# code for downloading files from ftp server to client
1
by: Bryan729 | last post by:
Hi, I created a public folder which were I upload my actual files and a database table named "file" which I put and stored the path for my actual files, I was wondering if there's a code for...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.