Managed WebBrowser Control

C

Clariton

Hi
I am trying to do my own implementation of IInternetSecurityManager
using managed WebBrowser control. C# Beta documentation suggests that

"To use this feature, implement classes that inherit from the
WebBrowser and WebBrowser.WebBrowserSite classes. The WebBrowser
ActiveX control uses the protected CreateAxSite method to retrieve
extensibility interfaces implemented by the WebBrowser.WebBrowserSite
class. Override the CreateAxSite method to return an instance of your
own class that inherits from the WebBrowser.WebBrowserSite class. The
WebBrowser.WebBrowserSite class provides default implementations of
the OLE interfaces IDocHostUIHandler and InternetSecurityManager. You
can provide your own implementation of these interfaces or implement
any other WebBrowser ActiveX control interface in order to customize
the behavior of the control."

I can inherit a class from WebBrowserClass and override CreateAxSite
but I am not able to inherit a class from WebBrowser.WebBrowserSite
since this a protected class with in WebBrowser class. I am not sure
how to implement what is suggested in documentation without doing this
step. I would like to be able to do my own implementation if
IInternetSecurityManager. Please let me know if you have any sample
app/Code doing this in C# .
Thanks a lot.
Ivneet
 
G

Guest

Hi
I am trying to do my own implementation of IInternetSecurityManager
using managed WebBrowser control. C# Beta documentation suggests that

"To use this feature, implement classes that inherit from the
WebBrowser and WebBrowser.WebBrowserSite classes. The WebBrowser
ActiveX control uses the protected CreateAxSite method to retrieve
extensibility interfaces implemented by the WebBrowser.WebBrowserSite
class. Override the CreateAxSite method to return an instance of your
own class that inherits from the WebBrowser.WebBrowserSite class. The
WebBrowser.WebBrowserSite class provides default implementations of
the OLE interfaces IDocHostUIHandler and InternetSecurityManager. You
can provide your own implementation of these interfaces or implement
any other WebBrowser ActiveX control interface in order to customize
the behavior of the control."

I can inherit a class from WebBrowserClass and override CreateAxSite
but I am not able to inherit a class from WebBrowser.WebBrowserSite
since this a protected class with in WebBrowser class. I am not sure
how to implement what is suggested in documentation without doing this
step. I would like to be able to do my own implementation if
IInternetSecurityManager. Please let me know if you have any sample
app/Code doing this in C# .
Thanks a lot.
Ivnee

User submitted from AEWNET (http://www.aewnet.com/)
 
L

leafyoung

Hi
I am trying to do my own implementation of IInternetSecurityManager
using managed WebBrowser control. C# Beta documentation suggests that

"To use this feature, implement classes that inherit from the
WebBrowser and WebBrowser.WebBrowserSite classes. The WebBrowser
ActiveX control uses the protected CreateAxSite method to retrieve
extensibility interfaces implemented by the WebBrowser.WebBrowserSite
class. Override the CreateAxSite method to return an instance of your
own class that inherits from the WebBrowser.WebBrowserSite class. The
WebBrowser.WebBrowserSite class provides default implementations of
the OLE interfaces IDocHostUIHandler and InternetSecurityManager. You
can provide your own implementation of these interfaces or implement
any other WebBrowser ActiveX control interface in order to customize
the behavior of the control."

I can inherit a class from WebBrowserClass and override CreateAxSite
but I am not able to inherit a class from WebBrowser.WebBrowserSite
since this a protected class with in WebBrowser class. I am not sure
how to implement what is suggested in documentation without doing this
step. I would like to be able to do my own implementation if
IInternetSecurityManager. Please let me know if you have any sample
app/Code doing this in C# .
Thanks a lot.
Ivnee

User submitted from AEWNET (http://www.aewnet.com/)
 
L

leafyoung

You can do it like this:
//code start

namespace GrandSoft.WebBrowserEx
{
[ToolboxItem(true)]
public partial class WebBrowserEx : WebBrowser
{
class WebBrowserSiteEx : WebBrowser.WebBrowserSite
{
public WebBrowserSiteEx(WebBrowser host) : base(host)
{
}
}

public WebBrowserEx()
{
InitializeComponent();
}

protected override WebBrowserSiteBase CreateWebBrowserSiteBase()
{
return new WebBrowserSiteEx(this);
}
}
}
//code end
Hi
I am trying to do my own implementation of IInternetSecurityManager
using managed WebBrowser control. C# Beta documentation suggests that

"To use this feature, implement classes that inherit from the
WebBrowser and WebBrowser.WebBrowserSite classes. The WebBrowser
ActiveX control uses the protected CreateAxSite method to retrieve
extensibility interfaces implemented by the WebBrowser.WebBrowserSite
class. Override the CreateAxSite method to return an instance of your
own class that inherits from the WebBrowser.WebBrowserSite class. The
WebBrowser.WebBrowserSite class provides default implementations of
the OLE interfaces IDocHostUIHandler and InternetSecurityManager. You
can provide your own implementation of these interfaces or implement
any other WebBrowser ActiveX control interface in order to customize
the behavior of the control."

I can inherit a class from WebBrowserClass and override CreateAxSite
but I am not able to inherit a class from WebBrowser.WebBrowserSite
since this a protected class with in WebBrowser class. I am not sure
how to implement what is suggested in documentation without doing this
step. I would like to be able to do my own implementation if
IInternetSecurityManager. Please let me know if you have any sample
app/Code doing this in C# .
Thanks a lot.
Ivnee

User submitted from AEWNET (http://www.aewnet.com/)
 
L

leafyoung

You can do it like this:
//code start

namespace GrandSoft.WebBrowserEx
{
[ToolboxItem(true)]
public partial class WebBrowserEx : WebBrowser
{
class WebBrowserSiteEx : WebBrowser.WebBrowserSite
{
public WebBrowserSiteEx(WebBrowser host) : base(host)
{
}
}

public WebBrowserEx()
{
InitializeComponent();
}

protected override WebBrowserSiteBase CreateWebBrowserSiteBase()
{
return new WebBrowserSiteEx(this);
}
}
}
//code end
Hi
I am trying to do my own implementation of IInternetSecurityManager
using managed WebBrowser control. C# Beta documentation suggests that

"To use this feature, implement classes that inherit from the
WebBrowser and WebBrowser.WebBrowserSite classes. The WebBrowser
ActiveX control uses the protected CreateAxSite method to retrieve
extensibility interfaces implemented by the WebBrowser.WebBrowserSite
class. Override the CreateAxSite method to return an instance of your
own class that inherits from the WebBrowser.WebBrowserSite class. The
WebBrowser.WebBrowserSite class provides default implementations of
the OLE interfaces IDocHostUIHandler and InternetSecurityManager. You
can provide your own implementation of these interfaces or implement
any other WebBrowser ActiveX control interface in order to customize
the behavior of the control."

I can inherit a class from WebBrowserClass and override CreateAxSite
but I am not able to inherit a class from WebBrowser.WebBrowserSite
since this a protected class with in WebBrowser class. I am not sure
how to implement what is suggested in documentation without doing this
step. I would like to be able to do my own implementation if
IInternetSecurityManager. Please let me know if you have any sample
app/Code doing this in C# .
Thanks a lot.
Ivnee

User submitted from AEWNET (http://www.aewnet.com/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top