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 "- Microsoft InfoPath 2010" 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;