Create ActiveX controls that can be bound to infopath form data

Source: Internet
Author: User

From: Microsoft
The form can carry ActiveX controls. These controls can be ready-made (with certain constraints), or they can be specially written for infopath.

Compile ActiveX Controls

Like other controls in infopath, ActiveX controls should support the existing Component Object Model (COM) interface:

    • Idispatch
    • Ipersistpropertybag
    • Ipersiststreaminit
    • Ipropertypage
    • IObjectSafety
    • Ipropertypolicysink
    • Iviewobject
    • Ioleobject
    • Ioleinplaceobject

To enable infopath to update attributes in the control when attributes in the Document Object Model (DOM) are changed, the control should implement the following interfaces:

    • Iconnectionpointcontainer
    • Ienumconnectionpoints
    • Iconnectionpoint
    • Ienumconnections

 

The following two new COM interfaces have been added to provide closer control integration:

    • Iinfopathcontrol
    • Iinfopathcontrolsite

 

For more information about these interfaces, see the infopath object model help.

Add ActiveX Control to infopath design environment

"Control"The task pane allows you to use"Add custom control wizard"To add custom controls. You can use this wizard:

    • Select the registered ActiveX control.
    • Specify the cab to install ActiveX controls with forms.
    • Specify the binding property bound to XML.
    • Enable or disable attributes that may be helpful. For example, when XML does not exist or conditional format is used.
    • Specify data type binding.
Note
If ActiveX control is developed and added to infopath"Control"In the task pane, ActiveX control cannot be rebuilt before infopath is disabled.
Deploy ActiveX Controls

To distribute ActiveX controls, you can compile an installationProgramTo install the control on the target computer, and copy the infopath control template (ICT) file and the cab file to the user's folder Local Settings \ Application Data \ Microsoft \ infopath \ controls. Note that if two or more developers are developing forms using ActiveX controls in collaboration, each developer should have controls that have been added to the infopath design environment, otherwise, they cannot modify the properties of the control from the infopath.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.