UIObject Interface
Represents various user interface components that can be used in a Microsoft InfoPath 2010 form.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
<GuidAttribute("096cd549-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface UIObject _
Inherits UI2, UI
'Usage
Dim instance As UIObject
[GuidAttribute("096cd549-0786-11d1-95fa-0080c78ee3bb")]
public interface UIObject : UI2,
UI
Remarks
This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeUI2.
The UIObject (user interface) object provides a number of methods for displaying custom and built-in dialog boxes.
The UIObject object is used to programmatically display various types of dialog boxes to users as they fill out a form. It is not used for modifying the InfoPath user interface.
The UIObject object is accessed through the UI property of the XDocument object.
The UIObject object provides the Alert method, which is used to display a simple message box with some custom text, as shown in the following example:
thisXDocument.UI.Alert("Custom message text goes here.");
One of the built-in InfoPath dialog boxes that the UI object can display is the Digital Signatures dialog box; this dialog box can be displayed to the user by using the ShowSignatureDialog method, as follows:
thisXDocument.UI.ShowSignatureDialog();
Note
The ShowSignatureDialog method can be used only in forms that have been enabled for digital signing. The method will return an error if used in a form that is not enabled for digital signing.
For more information about using the UIObject object, see How to: Display Alerts and Dialog Boxes Using the InfoPath 2003 Object Model.