Share via


FormEvents class

Implements all of the events that a form template itself can raise.

Inheritance hierarchy

System.Object
  Microsoft.Office.InfoPath.FormEvents

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustInherit Class FormEvents
'Usage
Dim instance As FormEvents
public abstract class FormEvents

Remarks

The FormEvents class implements the form-level events of an InfoPath form template, such as loading a form or changing a view. The events raised by changes to the data in the underlying XML document of a form instance are handled separately and implemented by the XmlEvent type.

Important

The FormEvents class itself is not meant to be instantiated by the developer in form code. You should only add event handlers for form-level events from the Microsoft InfoPath design mode user interface. When you add an event handler to your form template from the design mode user interface, InfoPath generates code in the InternalStartup method of your form code file using the EventManager class and the member of the FormEvents class to bind the event to its event handler. For information on how to add event handlers in InfoPath design mode, see How to: Add an Event Handler.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

FormEvents members

Microsoft.Office.InfoPath namespace