FormControl.SetInitEventHandler Method
Sets the event handler in the host application for handling the event that occurs when the form is loaded in the FormControl object.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath.FormControl (in Microsoft.Office.InfoPath.FormControl.dll)
Syntax
'Declaration
Public Overridable Sub SetInitEventHandler ( _
handler As IInitEventHandler _
)
'Usage
Dim instance As FormControl
Dim handler As IInitEventHandler
instance.SetInitEventHandler(handler)
public virtual void SetInitEventHandler(
IInitEventHandler handler
)
Parameters
handler
Type: Microsoft.Office.InfoPath.IInitEventHandlerThe interface that must be implemented in the custom application to handle the event from the FormControl object.
Remarks
Sets the function in the host application that is used as a callback function for the Initialize event, which is called before the InfoPath OnLoad event.
For more information about the FormControl object, see Hosting the InfoPath Form Editing Environment in a Custom Windows Form Application.