webbrowser控件报错有什么好的解决办法
展开全部
引用Interop.SHDocVw.dll
C# code?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class EWebBrowser : System.Windows.Forms.WebBrowser
{
SHDocVw.IWebBrowser2 Iwb2;
protected override void AttachInterfaces(object nativeActiveXObject)
{
Iwb2 = (SHDocVw.IWebBrowser2)nativeActiveXObject;
Iwb2.Silent = true;
base.AttachInterfaces(nativeActiveXObject);
}
protected override void DetachInterfaces()
{
C# code?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class EWebBrowser : System.Windows.Forms.WebBrowser
{
SHDocVw.IWebBrowser2 Iwb2;
protected override void AttachInterfaces(object nativeActiveXObject)
{
Iwb2 = (SHDocVw.IWebBrowser2)nativeActiveXObject;
Iwb2.Silent = true;
base.AttachInterfaces(nativeActiveXObject);
}
protected override void DetachInterfaces()
{
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询