Upravit

Sdílet prostřednictvím


_Application3.ActiveWindow Property

Definition

Gets a reference to a WindowObject object that represents the currently active window.

public:
 property Microsoft::Office::Interop::InfoPath::WindowObject ^ ActiveWindow { Microsoft::Office::Interop::InfoPath::WindowObject ^ get(); };
public Microsoft.Office.Interop.InfoPath.WindowObject ActiveWindow { get; }
member this.ActiveWindow : Microsoft.Office.Interop.InfoPath.WindowObject
Public ReadOnly Property ActiveWindow As WindowObject

Property Value

A WindowObject object that represents the currently active window.

Implements

Examples

In the following example, the ActiveWindow property is used to gain access to the MailEnvelope property of the WindowObject object that returns a MailEnvelopeObject object.

MailEnvelope email = thisApplication.<span class="label">ActiveWindow</span>.MailEnvelope;
email.Subject = getNode(@"/mtg:meetingAgenda/mtg:subject").text;
email.To = aliases + "; ";
email.Visible = true;

In the following example, the ActiveWindow property is used to gain access to the MailEnvelope property of the WindowObject object that returns a MailEnvelopeObject object.

MailEnvelope email = thisApplication.<span class="label">ActiveWindow</span>.MailEnvelope;
email.Subject = getNode(@"/mtg:meetingAgenda/mtg:subject").text;
email.To = aliases + "; ";
email.Visible = true;

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.

Applies to