downloading files with IE built-in method...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • S.W. Rasmussen

    #1

    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


  • Slaatje

    #2
    Re: downloading files with IE built-in method...

    Private Declare Function URLDownloadToFi le Lib "urlmon" Alias
    "URLDownloadToF ileA" (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(UR L As String, LocalFilename As String) As
    Boolean
    Dim lngRetVal As Long
    lngRetVal = URLDownloadToFi le(0, URL, LocalFilename, 0, 0)
    If lngRetVal = 0 Then DownloadFile = True
    End Function
    Private Sub Form_Load()
    'example by Matthew Gates (Puff0rz@hotmai l.com)
    DownloadFile "http://www.allapi.net" , "c:\allapi. htm"
    End Sub



    S.W. Rasmussen heeft geschreven in bericht
    <40874e35$0$247 $edfadb0f@dread 11.news.tele.dk >...[color=blue]
    >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[/color]
    for[color=blue]
    >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
    >
    >[/color]


    Comment

    • Randy Birch

      #3
      Re: downloading files with IE built-in method...

      But he want's an interface.

      --

      Randy Birch
      MVP Visual Basic

      Please respond only to the newsgroups so all can benefit.


      "Slaatje" <Sorry-no@mail.com> wrote in message
      news:c67p01$4m2 $1@reader08.wxs .nl...
      : Private Declare Function URLDownloadToFi le Lib "urlmon" Alias
      : "URLDownloadToF ileA" (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(UR L As String, LocalFilename As String) As
      : Boolean
      : Dim lngRetVal As Long
      : lngRetVal = URLDownloadToFi le(0, URL, LocalFilename, 0, 0)
      : If lngRetVal = 0 Then DownloadFile = True
      : End Function
      : Private Sub Form_Load()
      : 'example by Matthew Gates (Puff0rz@hotmai l.com)
      : DownloadFile "http://www.allapi.net" , "c:\allapi. htm"
      : End Sub
      :
      :
      :
      : S.W. Rasmussen heeft geschreven in bericht
      : <40874e35$0$247 $edfadb0f@dread 11.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
      : >
      : >
      :
      :

      Comment

      • S.W. Rasmussen

        #4
        Re: downloading files with IE built-in method...

        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" <rgb_removethis @mvps.org> wrote in message
        news:7e1ic.2238 32$2oI1.6981@tw ister01.bloor.i s.net.cable.rog ers.com...[color=blue]
        > 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" <Sorry-no@mail.com> wrote in message
        > news:c67p01$4m2 $1@reader08.wxs .nl...
        > : Private Declare Function URLDownloadToFi le Lib "urlmon" Alias
        > : "URLDownloadToF ileA" (ByVal pCaller As Long, ByVal szURL As String,[/color]
        ByVal[color=blue]
        > : szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As
        > : Long
        > : Public Function DownloadFile(UR L As String, LocalFilename As String) As
        > : Boolean
        > : Dim lngRetVal As Long
        > : lngRetVal = URLDownloadToFi le(0, URL, LocalFilename, 0, 0)
        > : If lngRetVal = 0 Then DownloadFile = True
        > : End Function
        > : Private Sub Form_Load()
        > : 'example by Matthew Gates (Puff0rz@hotmai l.com)
        > : DownloadFile "http://www.allapi.net" , "c:\allapi. htm"
        > : End Sub
        > :
        > :
        > :
        > : S.W. Rasmussen heeft geschreven in bericht
        > : <40874e35$0$247 $edfadb0f@dread 11.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[/color]
        destination[color=blue]
        > : for
        > : >the downloaded file. Does anyone know if it is possible to circumvent[/color]
        the[color=blue]
        > : >save dialogbox, for example by hiding it, or by auto-clicking the save
        > : >command button on the dialogbox closing the box with the destination[/color]
        path[color=blue]
        > : >without user intervention?
        > : >
        > : >Cheers, Soeren
        > : >
        > : >
        > :
        > :
        >[/color]


        Comment

        Working...