Create Custom Download Manager for VB Webbrowser?!

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
36 posts Page 2 of 4
Contributors
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

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 ?
YouTube Downloader v3.0
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

That's the idea.
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

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.
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

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 :)
YouTube Downloader v3.0
Image
Image
Image
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Yes I am, and we all are. THat's what this community is all about.
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

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 ?
YouTube Downloader v3.0
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

The FileDownload event doesn't contain any useful information in e. You could use WebClient.DownloadFile to download the flv file.
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

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.
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

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...
YouTube Downloader v3.0
Image
Image
Image
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

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.
Image
36 posts Page 2 of 4
Return to “Tutorial Requests”