rt
解决方案 »
- 如何将XML文件转换成XSD最好有详细的步骤!!!
- wpf中引用新的窗口
- 串口类 SerialPort 断开后重新打开的问题?
- 建立对象以后,属性是否占内存空间?属性一定要跟私有字段联系起来使用吗?
- 空白解决方案下面建立三层结构项目的问题
- How do i know if my solution was running against .Net Framework1.1 or .Net Framework2.0?
- 如何将网页代码内的所有超链接编码??在线等。。急。
- 控制台中怎么编译两个以上的.cs文件?
- 怎样让StatusBar自动显示当前时间和日期?如VB的控件一样。
- document.all.WebBrowser.ExecWB(7,1) 打印预览,一共八张图,为什么预览出来是四张+两个半张?只有在IE8非兼容模式下才正常
- 有关remoting客户端通道注册
- 如何为TreeNOde节点加上提示信息?
{
IHTMLDocument2 vDocument = (IHTMLDocument2)webBrowser1.Document.DomDocument;
foreach (IHTMLElement vElement in vDocument.all)
if (vElement.tagName.ToUpper() == "FRAME")
{
IHTMLFrameBase2 vFrameBase2 = vElement as IHTMLFrameBase2;
//TODO : vFrameBase2
}
}
{
IHTMLDocument2 vDocument = (IHTMLDocument2)webBrowser1.Document.DomDocument;
foreach (IHTMLElement vElement in vDocument.all)
if (vElement.tagName.ToUpper() == "FRAME")
{
IHTMLFrameBase2 vFrameBase2 = vElement as IHTMLFrameBase2;
//TODO : vFrameBase2
}
}哪儿错?
用的是下面的方法 HTMLDocument myDoc = (HTMLDocument)axWb.Document;
mshtml.IHTMLWindow2 oWin = myDoc.parentWindow;
mshtml.FramesCollection myFrame = oWin.frames;
mshtml.IHTMLWindow2 getWin; //textBox1.Text = myDoc.body.innerHTML;
object x;
for (int i = 0; i < myFrame.length; i++)
{
x = i;
getWin = (mshtml.IHTMLWindow2)myFrame.item(ref x);
textBox1.Text += i+"."+getWin.document.nameProp+"\r\n";
textBox1.Text += getWin.document.body.innerHTML+"\r\n";
}
mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2)axWebBrowser1.Document;
object f=1;
mshtml.HTMLWindow2Class w2=(mshtml.HTMLWindow2Class)doc.frames.item(ref f);
mshtml.IHTMLDocument2 doc2 = (mshtml.IHTMLDocument2)w2.document;
textBox1.Text =doc2.body.innerHTML;
object j;
for (int i = 0; i < doc.parentWindow.frames.length; i++)
{
j = i;
HTMLWindow2Class frame = doc.parentWindow.frames.item(ref j) as HTMLWindow2Class;
MessageBox.Show(frame.name);
}