We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Show ActiveX Controls

Hello,

I have added a ActiveX control to my HTML as <object>. In the Internet Explorer it is possible to set the security setting "Download ActiveX Controls" to Enable, so that they are shown in the browser.

How can I change this setting in the HTMLUIControl?

Br,

Matt


3 Replies

AD Administrator Syncfusion Team July 3, 2005 03:53 AM UTC

Hi Matt, There is no concept of ActiveX controls in HTMLUI. All controls are treated equally. Since you have programmatic access over the control creation process, you could prevent or allow any control to be created based on your requirements. Could you please provide some more detail about what you are trying to achieve and I will clarify. Thanks, Davis


AD Administrator Syncfusion Team July 4, 2005 03:14 PM UTC

Hi Davis,

I would like to use the HTMLUIControl instead of the Microsoft WebBrowser control (COM component).
I have added an ActiveX to my HTML (test.html):

<object id="Chart" classid="clsid:3E3116D5-A6AA-11D0-9AB0-EB8E16EF8654" width="900" height="700" <param name="NumDiagrams" value="2" /></object>

I have loaded this document into the HTMLUIControl:
this.htmluiControl1.LoadHTML("test.html");

The HTMLUIControl does not show this ActiveX control. The Internet Explorer shows it (with appropriate settings for ActiveX controls).

I would like to show it and programaticlly access this ActiveX control to set its properties and call its functions...
I tried to access the control the following way:
IInputHTML doc = this.htmluiControl1.Document;
IHTMLElement htmlElement = doc.GetElementByUserId("Chart");
Control ctrl = doc.GetControlByElement(htmlElement);

It works but the GetControlByElement() returns null. Maybe because the control is not shown (instanziated).
Am I doing something wrong? Is there a way to solve this problem with the HTMLUIControl?

Best regards and thanks for help,
Matt




AD Administrator Syncfusion Team July 6, 2005 05:55 PM UTC

Hi Matt, There are two ways to display a custom control (custom control means non HTML control - it includes any windows forms and ActiveX controls) in HTMLUI. 1. Use custom tag to create the control in HTML code itself - This approach does not work with ActiveX controls and I have submitted a bug report for this. 2. Create a control at design time and let HTMLUI do the layout at runtime. This approach is illustrated in the sample linked to below: HTMLUIActiveX_35.zip Thanks, Davis

Loader.
Up arrow icon