I am using the WebBrowser control in an application to "screen scrape"
links. The user puts in a URL and the app will then get all links
conforming to a certain pattern. This works well.
Now there are a set of buttons to activate the links "provided" and cause a
download of files thru the browser control. This works well as the IE
dialog to "Open/Save" the file happens and the user can controls this.
Now the problem. If the app is closed while files are downloading then the
active downloads are killed. Is there any way that I can monitor the
download windows and when all downloads are complete then allow, without a
user prompt, the application to end.
If I could monitor at least the number of open windows in the app that
should do it?
Any ideas,
Thanks
Lloyd Sheen
Anand Mukundan - 02 Oct 2007 19:29 GMT
Use the FindWindow API to find if a windows with the specific Class is open.
You may also get positive finds if the user has an IE open and that is
downloading a file. Or you can use something like FindWindowEx to find only
windows that are created by your browser.
http://msdn2.microsoft.com/en-us/library/ms633499.aspx

Signature
Rgds,
Anand
http://www.dotnetindia.com
> I am using the WebBrowser control in an application to "screen scrape"
> links. The user puts in a URL and the app will then get all links
[quoted text clipped - 15 lines]
> Thanks
> Lloyd Sheen