About using ActiveX controls on forms

Microsoft Office InfoPath 2003

Show All Show All

About using ActiveX controls on forms

In Microsoft Office InfoPath 2003, you can make Microsoft ActiveX controls available in design mode and then use those controls on the forms that you design. This is useful when you want to provide a user interface element that isn't available in Microsoft Office InfoPath 2003, such as a slider control that comes with Microsoft Windows. You or your company can also create custom ActiveX controls for a specific business use. For example, a hospital might develop an ActiveX control that allows medical imagery to be displayed on a form.

Making ActiveX controls available in design mode

Before you can add ActiveX controls to your forms, you must make them available in the Controls task pane. InfoPath includes an Add Custom Control Wizard that guides you through the process of selecting the ActiveX control, including an installation cabinet (.cab) file with your form, if necessary, and specifying binding options and other properties for the ActiveX control. You can open this wizard by clicking Add or Remove Custom Controls at the bottom of the Controls task pane.

After the ActiveX control appears in the task pane, you can insert it onto your form. If you double-click the ActiveX control, any property pages that are specific to that control will appear alongside the standard InfoPath property pages for ActiveX controls.

If a number of form designers in your organization need to use the same ActiveX control on their forms, and if that control is not already installed on their computers, you can create a custom setup program, such as a Microsoft Windows Installer Package (.msi) file. This custom setup program can quickly install and register the ActiveX control for the form designers.

Making ActiveX controls available to users

When you publish a form that contains an ActiveX control, that control must be installed and registered on your users' computers in order for the form to open. Some ActiveX controls, like those that are included with Windows, may already be installed and registered on the users' computers. Other ActiveX controls, such as custom controls that you develop, may not be installed and registered. In this case, you must take measures to install and register the controls for your users.

If you plan to install your form with a custom installation program, you can install and register the control at that point. Alternatively, you can specify an existing .cab file in the Add Custom Control Wizard.

When you use the Add Custom Control Wizard to make an ActiveX control available, the wizard asks you whether you want to package an existing .cab file along with your form template. This file allows the control to be installed and registered on your users' computers. If you choose to include a .cab file with your form and your users do not already have the ActiveX control installed, InfoPath prompts them to install the control when they open the form for the first time.

InfoPath automatically installs and registers the control for users if both of the following requirements are met:

  • The .cab file is signed. A digital certificate is required to sign a .cab file; this creates a digital signature on the file.
  • The digital signature is from a form developer or other "trusted" publisher. If the .cab file is signed but the publisher is not yet trusted on the user's computer, InfoPath displays a security alert and requires the user to enable trust for the publisher.

Security issues

When designing forms that include ActiveX controls, you should keep the following security issues in mind:

  • Use caution when you add ActiveX controls to your form. ActiveX controls may be designed in such a way that their use could pose a security risk. It is recommended that you use only controls from trusted sources.
  • ActiveX controls cannot be installed by or run on forms that have a restricted level of trust (as specified in the Form Options dialog box in design mode).
  • For information about designing more secure ActiveX controls, visit the Microsoft Developer Network (MSDN) Web site.

Note  The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more