转换ie COM组件为WinForm组件,然后再winform里控制访问

解决方案 »

  1.   

    Dim p As New System.Diagnostics.Process '
            Dim vstr_Url As String                  'URL
            'URL
            vstr_Url=.....'        With p.StartInfo
                .Arguments = vstr_Url   '
                .WorkingDirectory = 
                .FileName = 
                .WindowStyle = ProcessWindowStyle.Normal 
            End With            p.Start()
      

  2.   

    System.Diagnostics.Process  p;
    String    vstr_Url;             //URL
    vstr_Url="";
                p.StartInfo.Arguments = vstr_Url;   
    p.StartInfo.WorkingDirectory ="";
                p.StartInfo.FileName = "";//这里输入系统的ie所在的路径
                p.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
                p.Start();
    放到一个时间控件的代码里
      

  3.   

    定时打开,再关闭????? 做何用?
    如果仅为获取页面内容就简单了.string strUrl = "http://www.abc.com/"
    byte[] ret;
    System.Net.WebClient wc = new System.Net.WebClient();
    ret = wc.DownloadData(strUrl);如果要返回 string,可以
    string str = System.Text.Encoding.Default.GetString(ret);
      

  4.   

    谢谢xinbin1122,不好意思,看到C#了,可是如何实现点击一个链接呢?还望高手指点
      

  5.   

    call IHTMLElement::Click
    I suggest use WebBrowser Control shipped with .Net Framework 2.0.
      

  6.   

    ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
    startInfo.WindowStyle = ProcessWindowStyle.Maximized;
    startInfo.Arguments = "www.google.com"
    Process.Start(startInfo);
      

  7.   

    mshtml.HTMLDocument wd = (HTMLDocument)axWebBrowser1.Document;
    HTMLInputElement e1 = (HTMLInputElement)wd.getElementById("ename");
    e1.value = "aa";
    HTMLInputElement e2 = (HTMLInputElement)wd.getElementById("LinkButton1");
    e2.click();
    HTMLInputElement e3 = (HTMLInputElement)wd.getElementById("pwd");
    e3.value = da.Tables[0].Rows[i][this.rightListBox.Items[2].ToString()].ToString();
    HTMLInputElement e4 = (HTMLInputElement)wd.getElementById("desc");
    e4.value = da.Tables[0].Rows[i][this.rightListBox.Items[3].ToString()].ToString();
    mshtml.HTMLFormElement he = (HTMLFormElement)wd.forms.item("Form1", 0);
    he.submit();
      

  8.   

    xinbin1122(我喜欢这个奇怪的世界)
    正确
      

  9.   

    chenjinaban(陈进) ,你写的winform的么? 怎么好多类和函数都不存在?
      

  10.   

    chenjinaban(陈进),刚才我没有加引用,现在好了,可是在
    HTMLInputElement e1 = (HTMLInputElement)wd.getElementById("ename");
    这句出错,会是什么原因呢?