Application.ActiveWindow Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a reference to a Window object that represents the currently active window.
public:
abstract property Microsoft::Office::InfoPath::Window ^ ActiveWindow { Microsoft::Office::InfoPath::Window ^ get(); };
public abstract Microsoft.Office.InfoPath.Window ActiveWindow { get; }
member this.ActiveWindow : Microsoft.Office.InfoPath.Window
Public MustOverride ReadOnly Property ActiveWindow As Window
Property Value
A Window that provides access to the current window.
Examples
In the following example, the ActiveWindow property used to retrieve the Window object for the current window, and then the Caption property is used to display the title bar text of the window.
MessageBox.Show(this.Application.ActiveWindow.Caption);
MessageBox.Show(Me.Application.ActiveWindow.Caption)
Remarks
Using the ActiveWindow property, you can gain immediate access to the window that is currently being viewed by the user, and then use the properties and methods of the Window object that it returns.
This member can be accessed without restrictions.
This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.