UI2.Confirm method

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

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

XdConfirmChoice Confirm(
	string bstrPrompt,
	XdConfirmButtons lButtons


Type: System.String

The text message to be displayed.

Type: Microsoft.Office.Interop.InfoPath.XdConfirmButtons

Specifies the number and type of buttons to display. You may specify any of the values of the XdConfirmButtons enumeration.

In the following example, the Confirm method of the UIObject object is used to display a dialog box with Yes and No buttons:

thisXDocument.UI.Confirm("Do you wish to continue?", XdConfirmButtons.xdYesNo);