惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
I
InfoQ
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog
博客园_首页
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
B
Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
F
Fortinet All Blogs
月光博客
月光博客
GbyAI
GbyAI

博客园 - Dragon-China

JS实现显示倒影的图片展示特效之改变图片显示大小 转:如何用C#获得文件信息以及扩展信息 C#制作WinForm控件 InfoPath: Passing Command Line parameters to a new form Office 2003 主 Interop 程序集的安装和使用 .NET 反编译工具及其插件 Extensible OLE Property Pages in .NET COM组件设计与应用之GUID和接口 用C#创建COM对象 ActiveX and Com Infopath中,自己编写的ActiveX控件,为何不能绑定数据到XML属性节点 一位软件工程师的6年总结本人读了深受启发,献给所有从事IT开发的人[转贴] InfoPath 的自动化和扩展 创建可绑定到 InfoPath 表单数据的 ActiveX 控件 InfoPath2007 开发人员的新增功能 在Infopath中使用自定义控件不能激发 OnPropertyChange 事件 ActiveX控件和它的容器 值得推荐的Infopath开发例子和资料 Custom Control support in InfoPath
Extending the InfoPath control set with custom controls
Dragon-China · 2007-11-01 · via 博客园 - Dragon-China

From: http://blogs.msdn.com/infopath/archive/2004/04/09/110504.aspx

InfoPath provides a rich and complete set of generic built-in controls in both 1.0 and SP-1, but there are some cases where there is a need for a control that is specific to your form or to your organization.  InfoPath SP-1 provides functionality to let users extend the set of controls available. Form developers can leverage currently existing ActiveX controls and use them within InfoPath. Also, following a few prescribed steps, software developers can write their own ActiveX controls to be used in InfoPath.

InfoPath’s custom control support allows users to create controls for three different types of binding:

Simple data type (string, numbers, etc)

Controls that are written to bind to simple data types would allow a control to do custom processing on data before it gets put into the XML. The control can be designed to have UI that combines multiple simple controls (buttons, textboxes, checkboxes, etc…) to encapsulate them into one control. For example, multiple buttons can be combined with a textbox to make an in-document calculator control. Combining these all into one control will provide a simple way to re-use the same control in multiple forms.

XML stream

InfoPath SP-1 allows XML nodes to follow any schema. This allows form developers to work with industry standard XML Schemas. One example is a MathML control that could be written for InfoPath to save XML compliant with the MathML schema and display it in InfoPath form in a meaningful manner.

IXMLDomNode

For greater flexibility, InfoPath custom controls can be bound to an IXMLDomNode and any msxml operations can be performed directly on the XML tree.

Deployment

Custom controls need not be installed on every form users’ computer before loading the form. Controls can be packaged with your form solution so that on first open, the control will be registered and installed. Controls should be stored in a CAB files and able to self-register.

Security

Custom controls in InfoPath have a few security constraints to keep users safe. Firstly, all custom controls used within InfoPath require the IObjectSafety interface to be implemented and the control to be marked as Safe for Scripting and Safe for Initialization. Without these two flags, InfoPath will not load the form and will notify the user.

In addition, for solution which have controls packaged in the form solution, it is necessary to sign the CAB files with a digital signature. When users open the form for the first time, they will be prompted on whether or not they will accept the control signed with that signature (similar to the ActiveX control dialogs you see in Windows 2k/XP).

For detailed information on how to write a custom control for InfoPath, see Lab 06 in the MSDN InfoPath 2003 Training. (http://msdn.microsoft.com/library/en-us/odc_ip2003_tr/html/odc_INF_Lab_06.asp)