Question Webbrowser download without prompt

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
517
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
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,779
Location
Sydney, Australia
Programming Experience
10+
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.
 

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
517
Programming Experience
3-5
i use the webbrowser to open to a URL with different links. I would click on one of them to do a download.
 
Top Bottom