就是说网页中有什么控件,就加到WinForm中我知道可能是用WebBrowser,可是怎么用啊webBrowser1.Navigate(new Uri("http://www.baidu.com"));
           
string txt = webBrowser1.DocumentText;然后呢?比如说获取一个按钮:请大家多多指点

解决方案 »

  1.   

    HtmlDocument htm = this.webBrowser1.Document; 
                HtmlElementCollection all = htm.All; 
                for (int i = 0; i < all.Count; i++) 
                { 
                    HtmlElement elem = all[i]; 
                   
                } webBrowser.Document.InvokeScript("", null); 
    HtmlElement btn= webBrowser.Document.All["button"]; 
    btn.InvokeMember("click"); 
      

  2.   


    还是不大明白,能说一下整体的思路嘛?为什么我运行时“btn.InvokeMember("click");”这句异常啊
      

  3.   

    太抽象了
      就比如说
    网页上有一个控件,怎样把它检测出来是哪种控件然后加到WinForm中?