Events don't trigger

S

ss yy via .NET 247

In my C# code I am finding all of the open IE windows in a loopand assigning their HWND to an object or this:

SHDocVw.InternetExplorerie=(SHDocVw.InternetExplorer)shellWindows.Item(i);

if I say something like this in the loop ie.quit(); then all ofthe windows will be closed successfully. But in fact what I wantto do is to assign each windows' ProgressChange event to afunction as such:

ie.ProgressChange += newSHDocVw.DWebBrowserEvents2_ProgressChangeEventHandler(test1);

as you can clearly see "test1" is the function that is supposedto be triggered while any of the ie windows are browsing. Thefunction triggers initially "sometimes" but after you visit acouple of pages for a while it just stops working and won'ttrigger anymore. It even sometimes won't work from the startup.

I have tested this code on only one ie window too but I got thesame result.

On the other hand ie.quit(); always works no matter how many IEwindows are open or if you're browing any page or anything.

Any help would be greatly appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top