Edit

Share via


FormEvents Class

Definition

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

public ref class FormEvents abstract
public abstract class FormEvents
type FormEvents = class
Public MustInherit Class FormEvents
Inheritance
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.

Constructors

FormEvents()

Events

ContextChanged

Occurs after the context node changes.

Loading

Occurs when the form template has been loaded, but before any views have been initialized.

Merge

Occurs when the Merge Forms command is invoked from the user interface, or InfoPath is started with the /aggregate command-line switch.

Save

Occurs when the Save or Save As commands are used from the user interface, or when the Save() and SaveAs(String) methods are used.

Sign

Occurs after a set of signed data has been selected to sign through the Digital Signatures dialog box.

Submit

Occurs when the Submit command is used from the user interface, or the Submit() method is used.

VersionUpgrade

Occurs when the version number of the form being opened is older than the version number of the form template on which it is based.

ViewSwitched

Occurs after a view of a form has been successfully switched.

Applies to