Page 2 of 4
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Fri Feb 11, 2011 9:02 pm
by Napster1488
mandai wrote:You should go with the first suggestion.
ok,then on filedownload add e.cancel=true
then filter out the file with something like if e.url.endswith=".exe"
then add downloader as webclient downloader.downloadfileasync(url) ? something like this ?
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Fri Feb 11, 2011 11:34 pm
by mandai
That's the idea.
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Sat Feb 12, 2011 3:54 am
by Usman55
Yeah, that's it. But if filedownload event doesn't works well, add the same code to navigating event. A better idea to see if it is a download is to add a huge list of extensions to your resources or a specializedstring in your settings. And then in the code, compare if the endswith property is similar to any extension or not.
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Sat Feb 12, 2011 4:07 am
by Napster1488
Usman55 wrote:Yeah, that's it. But if filedownload event doesn't works well, add the same code to navigating event. A better idea to see if it is a download is to add a huge list of extensions to your resources or a specializedstring in your settings. And then in the code, compare if the endswith property is similar to any extension or not.
Ok...
thanks , you Guys are really helpfull

Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Sat Feb 12, 2011 5:39 am
by Usman55
Yes I am, and we all are. THat's what this community is all about.
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Mon Mar 07, 2011 11:09 pm
by Napster1488
i just tryd the Code but it doesnt work ,
the e.cancel dont work on FileDownload Event ...
i wonna Download a FLV File from a Website trough a JavaScript but anyway i dont get it working ,
i have a JavaScript and when i Navigate on the current Page with it , it directly opens me the Download Dialog from the WebBrowser , but i wonna download the File without that Dialog , someone knows good code ?
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Tue Mar 08, 2011 1:13 pm
by mandai
The FileDownload event doesn't contain any useful information in e. You could use WebClient.DownloadFile to download the flv file.
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Tue Mar 08, 2011 1:26 pm
by Usman55
I used the same thing in my downloader the source of which I'm going to release, mandai. But I think he is asking how to cancel it and after that down it on his own.
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Tue Mar 08, 2011 2:08 pm
by Napster1488
Yes , so my JavaScript is open the Direct Download for the File , but i wonna Download the File with my own Downloader,but i cant get it working...
Re: Create Custom Download Manager for VB Webbrowser?!
Posted: Tue Mar 08, 2011 3:41 pm
by Usman55
Try the method which mandai supplied at first. In there put the code e.cancel and the code to open the downloader and also add the code to add the url to the downloader's textbox.