Question Webbrowser download without prompt

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
I created a webbrowser in a tab. I want to download files to the default directory without the save prompt.
webbroser:
            Dim imgBrowser As New WebBrowser
            With imgBrowser
                AddHandler .DocumentCompleted, AddressOf imgBrowser_DocumentCompleted
                AddHandler .NewWindow, AddressOf imgBrowser_NewWindow 'prevent new window from opening

                 .Size = New Size(tpBrowser.Width, tpBrowser.Height)
                .Location = New Point(0, 0)
                .Name = title

                .ScriptErrorsSuppressed = True
                .Navigate(url)

                tpBrowser.Controls.Add(imgBrowser)
            End With
 
No. Your question sounded like you were performing the download in code, rather than initiated by the user. You probably ought to be using a WebView2 rather than a WebBrowser.
 
i use the webbrowser to open to a URL with different links. I would click on one of them to do a download.
 
Back
Top