WindowsFormsApplicationBase.OnStartupNextInstance 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中覆寫時,允許在單一執行個體應用程式的後續執行個體啟動時執行程式碼。
protected:
virtual void OnStartupNextInstance(Microsoft::VisualBasic::ApplicationServices::StartupNextInstanceEventArgs ^ eventArgs);
protected virtual void OnStartupNextInstance (Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs eventArgs);
abstract member OnStartupNextInstance : Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs -> unit
override this.OnStartupNextInstance : Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs -> unit
Protected Overridable Sub OnStartupNextInstance (eventArgs As StartupNextInstanceEventArgs)
參數
- eventArgs
- StartupNextInstanceEventArgs
後續應用程式執行個體的命令列引數,表示是否應在結束例外狀況處理常式時,將第一個應用程式執行個體帶到前景。
備註
根據預設,這個方法會引發 StartupNextInstance 事件。 事件處理程式可以設定 BringToForeground 事件自變數的屬性。 如果 BringToForeground 為 True
,則方法會啟動主表單。 否則,主窗體會保持其目前狀態。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應