Activex Activate

The purpose of this topic is to provide guidelines for implementing Microsoft ActiveX Controls that interoperate well with containers and other controls.

Procedure will apply to all other INGEAR ActiveX controls. Select the INGEAR ActiveX License to activate from the pull down box. Installation ID.

You must activate the ActiveX settings in Internet Explorer IE to see the demo. IE4, 5 or 6 1. Click on Tools then Internet Options, choose the Security tab.

activex activate activex activate

Deprecated. Users cannot directly interact with Microsoft ActiveX controls loaded by the APPLET, EMBED, or OBJECT elements. Users can interact with such controls.

Enable or disable ActiveX settings in Office files. See how to work with ActiveX controls in your files, changing their settings, and how to enable or disable them by.

Adjust Internet Explorer ActiveX settings. To run genuine Windows validation, you must install an ActiveX control. Internet Explorer might not be configured to.

Activating ActiveX Controls

activex activate

Steps to enable ActiveX controls in Internet Explorer browser Manage control and secure your workstations, mobile devices and tablets.

Click on Tools in the Internet Explorer toolbar. Go down to Options.

Click on Security and then set a Custom Level.

Select ActiveX Controls and Plug-ins.

Make sure that Enable is checked next to ActiveX Controls and Plug-ins. Enable Script ActiveX Controls Marked Safe for Scripting as well.

Confirm the changes and hit Apply to ensure that they take effect.

Give us 3 minutes of knowledge.

Active X is primarily an issue in Internet Explorer 6 and 7. If you are running Windows XP or Windows Vista, you may be running one of these outdated versions of Internet Explorer.

If you don t want to deal with Active X at all, switch to a different browser or update your version of Internet Explorer to the latest one. Microsoft has made many improvements to how Internet Explorer loads Internet-based applications, and the Active X control has been essentially eliminated from the latest versions. No matter what operating system you are running, it is always best to run the very latest version of whatever browser you prefer. Browser companies regularly release updates that fix browser flaws and security holes.

If you prefer a greater amount of security, just leave the settings as they are. Every time an Active X plug-in tries to run a yellow box will pop up at the top of the page and you can click on that to allow or not allow the Active X control to run.

Running Internet-based applications like Java or Flash carry a small but inherent risk. If you prefer manual control and near-total security, stick with the way things are.

activex activate How to Activate Active X activex activate

Note  As of December 2011, this topic has been archived and is no longer actively maintained. For more information, see Archived Content. For information, recommendations, and guidance regarding the current version of Windows Internet Explorer, see Internet Explorer Developer Center.

Deprecated. Users cannot directly interact with Microsoft ActiveX controls loaded by the APPLET, EMBED, or OBJECT elements. Users can interact with such controls after activating their user interfaces. This topic describes how Internet Explorer handles ActiveX controls, shows how to load ActiveX controls so their interfaces are activated, and describes the impact of this behavior on accessibility tools and applications hosting the WebBrowser Control.

Note  This topic contains information relevant to versions of Internet Explorer released or updated between April, 2006 and April, 2008. As of April, 2008, this behavior has been removed from Internet Explorer. For more information, please see Information for Developers about Internet Explorer.

This topic contains the following sections.

For an introduction to the user experience, please see Internet Explorer 6: ActiveX Update.

For additional information regarding the platforms affected by this update, please see Internet Explorer ActiveX Update.

The information in this article is now deprecated; it originally applied to the following versions of Internet Explorer.

Microsoft Internet Explorer 6 in Windows XP Service Pack 2 SP2

Internet Explorer 6 in Windows Server 2003 Service Pack 1 SP1

Internet Explorer 6 in Windows Server 2003 Release 2 R2

Internet Explorer 6 in Windows Server 2003 Service Pack 2 SP2

Windows Internet Explorer 7 in Windows XP SP2

Internet Explorer 7 in Windows Server 2003 SP1

Internet Explorer 7 in Windows Server 2003 SP2

Internet Explorer 7 on Windows Vista

When the April 2008 Internet Explorer Cumulative Update is applied to any of these versions, the behavior described in this article is removed from Internet Explorer. In addition, the update also affects applications hosting the WebBrowser Control.

Understanding Control Activation

Interactive controls are ActiveX controls that provide user interfaces. When a web page uses the APPLET, EMBED, or OBJECT elements to load an ActiveX control, the control s user interface is blocked until the user activates it. If a page uses these elements to load multiple controls, each interactive control must be individually activated.

When a control is inactive, the following effects occur.

Dynamic HTML DHTML events related to user interaction, such as onblur and onclick, are blocked. Appendix A lists the DHTML events that are blocked when a control is inactive.

The control does not respond to window messages generated by the keyboard or mouse, such as WM_CLICK and WM_KEYPRESS, and so on.

An overlay window, created on the control s OLE site, prevents keyboard and mouse messages from reaching the inactive control.

When an inactive control is created, Internet Explorer uses different techniques to prevent keyboard or mouse window messages from reaching the control. When the inactive control is a windowed control, such as the HTML Help Control, Internet Explorer uses the EnableWindow Function to disable the inactive control s window. When the user activates a windowed control, the same function activates the disabled window. When the inactive control is a windowless control, such as the Office Web Components, keyboard and mouse messages are filtered by the control s container.

When a control is inactive, it does not respond to user input; however, it does perform operations that do not involve interaction. If, for example, you open a web page that uses Microsoft Windows Media Player to play a music file, the music plays after the page loads. You cannot interact with Windows Media Player until the control s user interface is activated, as shown in the following figure.

Note  While inactive controls do not respond to direct user interaction; they do respond to script commands.

To activate an interactive control, either click it or use the TAB key to set focus on it and then press the SPACEBAR or the ENTER key. Interactive controls loaded from external script files immediately respond to user interaction and do not need to be activated.

Some windowed controls use Windows API functions, such as GetKeyState and GetCursorPos, to determine the state of the keyboard and mouse and then respond to the function results. For these controls only, a prompt appears before the control is run in Internet Explorer. To run the control, the user needs to click the button in the message window before the page loads. After loading, the control will not require activation. At present, the following controls have this behavior, but the vendors are working on new controls that would not have this behavior.

Virtools TM Web Player from Virtools SA

Macromedia Shockwave Player TM from Adobe Systems Inc.

QuickTime TM from Apple Computer, Inc.

When loaded from external script files, these controls do not display a prompt.

The following screen shot shows the prompt dialog box.

Loading Interactive Controls Externally

To create Web pages that load interactive controls that respond immediately to user input, use Microsoft JScript to load controls from external script files. You cannot write script elements inline with the main HTML page to load your control externally. If the script is written inline programmatically, for example with the writeln function, the loaded control will behave as if it was loaded by the HTML document itself and will require activation. To ensure a control is interactive when it is loaded, use one of the following techniques to load your control from an external file.

The following example uses document.write to load a control dynamically.

External script files can also modify an element s outerHTML property to achieve the same effect, as shown in the following example.

embedControlLocation.outerHTML ;

The next example uses document.createElement to load an ActiveX control using the OBJECT element.

Important  When using createElement to add an Object or Embed element to a web page, use care to create the element, initialize its attributes, and add it to the page s DOM before creating the ActiveX control to be loaded by the new element. For more information, please see the createElement documentation.

var myObject document.createElement object ;

myObject.classid clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6 ;

The next example uses innerHTML and a JScript function to load an ActiveX control while specifying parameter values.

This text will be replaced by the control

clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6,

EXAMPLE_OBJECT_ID, 600, 400, example.wmv,

function CreateControl DivID, CLSID, ObjectID,

var d document.getElementById DivID ;

object classid CLSID id ObjectID

Because the next example uses the writeln function to insert the script into the original HTML document, the resulting control requires activation. To load a control without requiring activation, use one of the previous examples.

document.write document.writeln ;

clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6

Note  To automatically activate ActiveX controls, Internet Explorer must be using versions of vbscript.dll and jscript.dll newer than September 30, 2003. Earlier versions of this DLL will require all controls to be activated, regardless of the mechanism used to load them from a web page.

Programmatically Determining Whether a Control is Inactive

You cannot use JScript functions or server-side scripts to determine whether or not a control is active. Application hosting the web browser control cannot determine whether or not a control is active.

Controls can determine activation state via the DISPID_AMBIENT_UIDEAD ambient property by calling through IDispatch::Invoke. Controls that implement the IOleControl interface are notified when this property changes through IOleControl::OnAmbientPropertyChange.

When accessibility tools encounter ActiveX controls, they can use the object s IAccessible interface to obtain information about the control. Inactive controls can be activated with the IAccessible::accDoDefaultAction method.

The following table describes the results when IAccessible methods are called on inactive controls.

IAccessible::accDoDefaultActionActivates the control and will expose the ActiveX control or Java Applet within the MSAA tree.

IAccessible::accHitTestReturns CHILDID_SELF

IAccessible::accLocationLocation of the underlying ActiveX control or Java Applet

IAccessible::accNavigateReturns E_NOTIMPL

IAccessible::accSelectReturns E_NOTIMPL

IAccessible::get_accChildReturns S_FALSE

IAccessible::get_accChildCountReturns 0 and S_OK

IAccessible::get_accDefaultActionReturns Select this control

IAccessible::get_accDescriptionReturns E_NOTIMPL

IAccessible::get_accFocusReturns E_NOTIMPL

IAccessible::get_accHelpReturns This control is inactive. Select the control to activate and use it.

IAccessible::get_accHelpTopicNo Change - Returns E_NOTIMPL

IAccessible::get_accKeyboardShortcutNo Change - Delegates the object. If there is no object, the method returns E_NOTIMPL.

IAccessible::get_accNameReturns Inactive Control

IAccessible::get_accParentNo Change - Returns the closest accessible element in the parent chain.

IAccessible::get_accRoleReturns ROLE_SYSTEM_PUSHBUTTON

IAccessible::get_accSelectionReturns E_NOTIMPL

IAccessible::get_accStateReturns current state of the object. This state always includes STATE_SYSTEM_FOCUSABLE

IAccessible::get_accValueReturns E_NOTIMPL

IAccessible::put_accNameReturns E_NOTIMPL

IAccessible::put_accValueReturns E_NOTIMPL

For information on activated controls, or controls that do not require activation please see the Microsoft Active Accessibility SDK.

Note  Accessibility tools should refresh after triggering the default action in order to properly display the ActiveX control s data and the data of its children, if any.

By default, custom applications hosting the WebBrowser Control do not block interactive ActiveX controls loaded by the APPLET, EMBED, or OBJECT elements.

Important  The techniques in this section only apply to versions of the WebBrowser Control released or updated between April 2006 and April 2008; if your application uses one of these techniques to require control activation, your application may be affected by the April 2008 Internet Explorer Cumulative Update. After the update is applied to a user s copy of Internet Explorer, control activation will be required only for applications that use the DOCHOSTUIINFO structure to enable the behavior. The opt-in list and registry key are no longer supported after the April 2008 Internet Explorer Cumulative Update is applied.

Inactive control blocking only applies to the following applications.

Netscape 8 when using Internet Explorer as the rendering engine

To match the behavior of Internet Explorer in your application, add the DOCHOSTUIFLAG_ENABLE_ACTIVEX_INACTIVATE_MODE flag to the dwFlags parameter of your DOCHOSTUIINFO structure, as shown in the following example.

HRESULT GetHostInfo DOCHOSTUIINFO pInfo

pInfo- cbSize sizeof DOCHOSTUIINFO ;

pInfo- dwFlags Other DOCHOSTUIFLAGs

DOCHOSTUIFLAG_ENABLE_ACTIVEX_INACTIVATE_MODE;

You can also enable interactive control blocking by adding your application s process name to the following registry key.

HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER

FEATURE_ENABLE_ACTIVEX_INACTIVATE_MODE

process_name.exe DWORD 0x00000001

Note  Because users can modify the registry, the DOCHOSTUIINFO flag is the preferred way to enable interactive control blocking.

Applications can register to incorporate ActiveX control activation by default. For more information, please engage your Technical Account Manager or contact Microsoft Product Support.

Appendix A: DHTML Events Blocked by Inactive Controls

The following table lists the DTHML events that are blocked when ActiveX controls are inactive.