Implementing a Custom Download Manager

This is merely a suggestion and I did not test it, but you might try to use a WebBrowser control and tell it to open a distant file. It should open the IE download dialog and download your file in a quick and dirty way. However, some files will open with its default action...

Otherwise, you may download a file to your application like this (this is some old C# code from my very first .NET application) :

VB.NET:
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(imagePath);
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
imageStream = webResponse.GetResponseStream();

Image image = Image.FromStream(imageStream);

You will need to import the System.Net library.
 
I think, actually, the OP is trying to develop a Plugin for IE so that when he clicks a link in IE, his app will download the file, something like FreeDownloadManager does.. And its the Interop part that is giving trouble, not the downlaoding part..
 
I think, actually, the OP is trying to develop a Plugin for IE so that when he clicks a link in IE, his app will download the file, something like FreeDownloadManager does.. And its the Interop part that is giving trouble, not the downlaoding part..

That's correct cjard!
Any idea how to do that for my app?
Means as you said when you click a link in IE my app takes it from there ignoring the IE download dialog (not appearing at all)

Thanks :)
 
Back
Top