Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

Detecting, counting open web browser windows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lloyd Sheen - 02 Oct 2007 17:20 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.