About ActiveX controls
You can host ActiveX controls in forms. These controls can be preexisting (with some constraints) or can be written specifically for InfoPath.
As with other controls in InfoPath, ActiveX controls should support existing Component Object Model (COM) interfaces:
- IDispatch
- IPersistPropertyBag
- IPersistStreamInit
- IPropertyPage
- IObjectSafety
- IPropertyNotifySink
- IViewObject
- IOleObject
- IOleInPlaceObject
In order for InfoPath to update properties in the Document Object Model (DOM) at the time they change in the control, the control should implement the following interfaces:
- IConnectionPointContainer
- IEnumConnectionPoints
- IConnectionPoint
- IEnumConnections
Two new COM interfaces have been added to provide tighter integration of controls:
- IInfoPathControl
- IInfoPathControlSite
For more information on these interfaces, see the Help for the InfoPath object model.
Add an ActiveX control to the InfoPath design environment
The Controls task pane allows you to use a wizard to add a custom control. With the wizard, you can:
- Select an ActiveX control that has already been registered.
- Specify a CAB to install the ActiveX control with a form.
- Specify a binding property to bind to the XML.
- Specify an enable or disable property, which can be useful, for example, when the XML is not present or when conditional formatting is used.
- Specify data type binding.