I'm writing a program where an user can enter list of URLs to load and the program cycles through the URLs to load them in an IE instance one after another, like a website slideshow.
The problem is that when I enter an URL that requires some membership verification then IE shows the login prompt and practically freezes the IE window until I cancel or enter login details. I want my program to skip such cases (select cancel somehow).
Is there any way that my VB6 app can detect if a prompt is there and cancel it so the next URL can load?
Edited
Actually, you need to look for several other types of child windows as well, such as javascript alert() windows. You don't look for window captions (I was wrong) you look for window classnames.
To figure out which classnames to look for (there's not that many) I used Spy++. Then, at runtime, I called FindWindowEx()
(not FindWindow()
, I was wrong there) to see if IE had any child windows with those classnames. If I find one I send the Cancel click. (I think you can also send the window a WM_CLOSE
message, but I'm not sure.)
I don't have my old source handy--do you need more detail?