Share via


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

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.

See also

Reference

FormControl class

FormControl members

Microsoft.Office.InfoPath namespace