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

Hey Guys ,
i have a Question i just maked a Webbrowser with the Webbrowser that is included with Visual Basic..
And i wonna have a New Custom Download Manager ,so when i click on any File that can be Downloadet then that Downloader opens and automaticilly downloads the File...
i saw the "FileDownload" Event from the WebBrowser but i really dont know how i could code this ..
Can someone help ?!
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 easiest way would be to use the Navigating event in the webbrowser, then you can check to see if e.Url matches a format for a file that you would like use in your downloader. You can then set e.Cancel to True and download the file from your own code.
User avatar
Proprogrammer
VIP - Donator
VIP - Donator
Posts: 415
Joined: Sun Oct 03, 2010 11:14 pm

Very well done mandai, i wouldnt put better myself. After you do that all you need to do is make another form for downloading files and use a piece that finds the downloadable file. then puts it into a textbox, after that, it downloads the file that is set into the textbox.
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Napster1488 wrote:
Hey Guys ,
i have a Question i just maked a Webbrowser with the Webbrowser that is included with Visual Basic..
And i wonna have a New Custom Download Manager ,so when i click on any File that can be Downloadet then that Downloader opens and automaticilly downloads the File...
i saw the "FileDownload" Event from the WebBrowser but i really dont know how i could code this ..
Can someone help ?!
I think you can use the FileDownload event better than the Navigating. Just put e.cancel=true and enter your downloader code to it. In my case I used FormDownload.Textbox1.Text = FormMain.WebBrowser1.URL I haven't tested it cuz I didn't have a file to download lol. But try to tweak it a bit if it doesn't works. And if you want to download the file using Navigating event, then maybe the code will be like this: If WebBrowser1.URL.EndsWith ".exe" Then I haven't tried that either and maybe there is an equation symbol between the code but I am not sure.
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

very much thanks guys...i will try :)
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

Please do and tell me how it worked cuz I haven't checked it myself.
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Usman55 wrote:
Please do and tell me how it worked cuz I haven't checked it myself.
Ok
ohh before i forgott i just Created a YouTube Video Downloader with that u can Download YouTube Videos in different Quality...its working with the new YouTube Code.I will upload it in next Days here ;)
YouTube Downloader v3.0
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

I think you can use the FileDownload event
This isn't the same event that occurs when the file download dialog appears, also e is not a useful parameter in this event.
Last edited by mandai on Sat Jun 09, 2012 5:08 pm, edited 1 time in total.
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

mandai wrote:
I think you can use the FileDownload event
This isn't the same event that occurs when the file download dialog appears, also e is not a useful paramater in this event.
soo then what i should do ?
i havent tested it yet since i am not on my pc...
YouTube Downloader v3.0
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

You should go with the first suggestion.
36 posts Page 1 of 4
Return to “Tutorial Requests”