_Application3.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 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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應