C# 操作外部Internet Explorer浏览器

来源:这里教程网 时间:2026-02-21 13:01:45 作者:

private void Form1_Load(object sender, EventArgs e)  
{  
    object ppvComObject = null;  
    try 
    {  
        Guid CLSID_ShellWindows = new Guid("9BA05972-F6A8-11CF-A442-00A0C90A8F39");  
   
        Type pComType = Type.GetTypeFromCLSID(CLSID_ShellWindows, true);  
        ppvComObject = Activator.CreateInstance(pComType);  
   
        int webCount;  
        if ((webCount = (int)pComType.InvokeMember("Count", BindingFlags.GetProperty, null, ppvComObject, null)) > 0)  
        {  
            for (int i = 0; i 

相关推荐