Freigeben über


UI2.Confirm-Methode

Zeigt ein Meldungsfeld mit Schaltflächen für Benutzereingaben an.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)

Syntax

<DispIdAttribute(7)> _
Function Confirm ( _
    <InAttribute> bstrPrompt As String, _
    <InAttribute> lButtons As XdConfirmButtons _
) As XdConfirmChoice

Dim instance As UI2
Dim bstrPrompt As String
Dim lButtons As XdConfirmButtons
Dim returnValue As XdConfirmChoice

returnValue = instance.Confirm(bstrPrompt, lButtons)
[DispIdAttribute(7)] 
XdConfirmChoice Confirm (
    [InAttribute] string bstrPrompt,
    [InAttribute] XdConfirmButtons lButtons
)

Parameter

  • bstrPrompt
    Die anzuzeigende Textmeldung.
  • lButtons
    Gibt die Anzahl und den Typ der anzuzeigenden Schaltflächen an. Sie können einen beliebigen Wert der XdConfirmButtons-Enumeration angeben.

Rückgabewert

Eine XdConfirmChoice-Enumeration.

Beispiel

Im folgenden Beispiel wird die Confirm-Methode des UIObject-Objekts zur Anzeige eines Dialogfeldes mit den Schaltflächen Yes und No verwendet:

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

Siehe auch

Referenz

UI2-Schnittstelle
UI2-Member
Microsoft.Office.Interop.InfoPath-Namespace