Click to See Complete Forum and Search --> : Problem with frames using HTMLDocument


brunoleite
November 15th, 2005, 11:14 AM
I want to pick a particularly frame to work with within a page that is loaded on axWebBrowser2 form. Here's the link to the error picture:
http://img264.imageshack.us/img264/7700/pic4ac.jpg

crackersixx
November 16th, 2005, 01:17 PM
object objFrame;
IHTMLDocument2 doc = axWebBrowser1.Document as IHTMLDocument2;
for (int i = 0; i < (int)doc.frames.length; i++)
{
objFrame = i;
IHTMLWindow2 frame = (IHTMLWindow2)doc.frames.item(ref objFrame);
if (frame.name == "some frame")
doc = frame.document;
}