Edit

Share via


UIObject Interface

Definition

Represents various user interface components that can be used in a Microsoft Office InfoPath form.

public interface class UIObject : Microsoft::Office::Interop::InfoPath::UI2
[System.Runtime.InteropServices.Guid("096CD549-0786-11D1-95FA-0080C78EE3BB")]
public interface UIObject : Microsoft.Office.Interop.InfoPath.UI2
type UIObject = interface
    interface UI2
Public Interface UIObject
Implements UI2
Derived
Attributes
Implements
UI2

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(String) 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.

Methods

Alert(String)

Displays a message box with a custom text message in a Microsoft Office InfoPath form.

(Inherited from UI2)
Confirm(String, XdConfirmButtons)

Displays a message box with buttons for input from a user.

(Inherited from UI2)
SetSaveAsDialogFileName(String)

Sets the default file name for a form in the Save As dialog box.

(Inherited from UI2)
SetSaveAsDialogLocation(String)

Sets the initial location at which the Save As dialog starts to browse when it is opened.

(Inherited from UI2)
ShowMailItem(String, String, String, String, String)

Creates an e-mail message in the default e-mail editor and attaches the currently open Microsoft Office InfoPath form to the message.

(Inherited from UI2)
ShowModalDialog(String, Object, Object, Object, Object, Object)

Displays a custom modal dialog box in a Microsoft Office InfoPath form.

(Inherited from UI2)
ShowSignatureDialog()

Displays the Microsoft Office InfoPath 2003 Digital Signatures dialog box.

(Inherited from UI2)

Applies to