2015-08-28 96 views
0

我尝试使用这个类型或命名空间名称找不到 - C#

SHDocVw.InternetExplorer IE = new SHDocVw.InternetExplorer(); 
    IE.Visible = false; 
    IE.Navigate("www.testsite.com"); 

不过,我得到这个错误导航的Internet Explorer;

enter image description here

我怎样才能解决这个问题?

+0

[使用Visual C#2010 Express在C#项目中添加引用'SHDocVw']的可能副本(http://stackoverflow.com/questions/20845140/add-reference-shdocvw-in-c-sharp-project-using- visual-c-sharp-2010-express) –

+0

请发布错误信息而不是图像。 – juharr

回答

1

看起来你没有添加正确的参考,以便使用SHDocVw

尝试添加Microsoft Internet Controls参考(在COM选项卡中),然后您可以在您的班级中添加SHDOcVw

相关问题