Say I open an IE window and call the Navigate() method. A web page opens.
I use a delegate to capture the DocumentComplete and NavigateComplete2
events. However, they fire slightly before the page completely loads. This
article addresses the above issues for OnBeforeNavigate2 event:
http://www.codeproject.com/buglist/i...&select=408890. I
changed it to work with DocumentComplete(), which seems to work well for the
ActiveX object.
Problem is that I need access to an actual IE window, not the ActiveX object
on a form. So when I marshall the InternetExplorer object:
ie = new SHDocVw.InternetExplorerClass();
ie = (SHDocVw.InternetExplorerClass)
System.Runtime.InteropServices.Marshal.CreateWrapp erOfType(
axWebBrowser1.GetOcx(),
typeof(SHDocVw.InternetExplorerClass)
);
I end up with the page opening in the form, where the ActiveX object opened
it. This causes rendering problems such as JS script errors and such.
My question is how can I wait for the webpage to completely load? I'm open
to suggestions.
Thanks,
Brett