FormControl.SetSubmitToHostEventHandler(ISubmitToHostEventHandler) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在主机应用程序中设置事件处理程序,以处理 Submit() 对象的 方法 SubmitToHostAdapter 。
public:
virtual void SetSubmitToHostEventHandler(Microsoft::Office::Interop::InfoPath::ISubmitToHostEventHandler ^ handler);
public virtual void SetSubmitToHostEventHandler (Microsoft.Office.Interop.InfoPath.ISubmitToHostEventHandler handler);
abstract member SetSubmitToHostEventHandler : Microsoft.Office.Interop.InfoPath.ISubmitToHostEventHandler -> unit
override this.SetSubmitToHostEventHandler : Microsoft.Office.Interop.InfoPath.ISubmitToHostEventHandler -> unit
Public Overridable Sub SetSubmitToHostEventHandler (handler As ISubmitToHostEventHandler)
参数
- handler
- ISubmitToHostEventHandler
必须在自定义应用程序中实现以处理来自 FormControl 对象的事件的接口。
注解
在将数据提交回主机应用程序时,在主机应用程序中设置用作回调函数的函数。 若要配置用于提交到主机应用程序的数据连接,请在 InfoPath 设计模式下打开表单模板,单击“工具”菜单上的“提交选项”,选中“允许用户提交此表单”复选框,在下拉列表中选择“托管环境”,然后单击“添加”。
有关 FormControl 对象的详细信息,请参阅 在自定义 Windows 窗体应用程序中托管 InfoPath 表单编辑环境