Share via


Window2.Caption property

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

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.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 "- Microsoft InfoPath" on the title bar of the window

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 namespace