Share via


Window2.Caption property

Gets or sets the caption text for the window represented by the WindowObject object.

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

Syntax

'Declaration
Property Caption As String
    Get
    Set
'Usage
Dim instance As Window2
Dim value As String

value = instance.Caption

instance.Caption = value
string Caption { get; set; }

Property value

Type: System.String

Remarks

The caption text that is returned or set by this property corresponds to the text preceding "- InfoPath" on the title bar of the window

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Examples

In the following example, the Caption property is used to set the caption text of the active window.

string caption = "mycaption";
thisApplication.ActiveWindow.Caption = caption;

See also

Reference

Window2 interface

Window2 members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace