XmlFormCancelEventArgs Class
Provides data for the custom message that is displayed when canceling events raised by the form and its underlying XML document.
Inheritance Hierarchy
System.Object
System.EventArgs
System.ComponentModel.CancelEventArgs
Microsoft.Office.InfoPath.XmlFormCancelEventArgs
Microsoft.Office.InfoPath.SaveCancelEventArgs
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
Syntax
'Declaration
Public MustInherit Class XmlFormCancelEventArgs _
Inherits CancelEventArgs
'Usage
Dim instance As XmlFormCancelEventArgs
public abstract class XmlFormCancelEventArgs : CancelEventArgs
Remarks
The XmlFormCancelEvent object provides the Message and MessageDetails properties to specify or retrieve a custom message when canceling the Changing, Validating, Save, Merge, Submit, VersionUpgrade, and Loading events.
By default, the Message and MessageDetails properties have a a null reference (Nothing in Visual Basic) value.
When both values are a null reference (Nothing in Visual Basic), the default error message is displayed when an event is cancelled.
When both values are non-null, then the values specified for the Message and MessageDetails properties are displayed in the error message dialog box.
If both properties are set to the empty string, then no text is displayed in the error message dialog box.
The Message property can be a null reference (Nothing in Visual Basic) and the MessageDetails property can be non-null, and vice-versa. If either one of the values is non-null, then InfoPath will display the specified value. For example, if Message is a null reference (Nothing in Visual Basic), but MessageDetails has a value specified, InfoPath displays an error message dialog box with only the details section and no top-level text.
In the InfoPath design mode user interface, you can specify a custom message that is displayed when submitting succeeds or fails by using the Form Submit Options command on the Tools menu. If either the Message or MessageDetails properties are set in code, these values override any text specified in the InfoPath user interface.
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.