Share via


WindowsFormsApplicationBase.OnStartup(StartupEventArgs) 方法

定義

在衍生類別中覆寫時,允許在啟動應用程式時執行程式碼。

protected:
 virtual bool OnStartup(Microsoft::VisualBasic::ApplicationServices::StartupEventArgs ^ eventArgs);
protected virtual bool OnStartup (Microsoft.VisualBasic.ApplicationServices.StartupEventArgs eventArgs);
abstract member OnStartup : Microsoft.VisualBasic.ApplicationServices.StartupEventArgs -> bool
override this.OnStartup : Microsoft.VisualBasic.ApplicationServices.StartupEventArgs -> bool
Protected Overridable Function OnStartup (eventArgs As StartupEventArgs) As Boolean

參數

eventArgs
StartupEventArgs

應用程式的命令列引數,指出是否應取消啟動應用程式。

傳回

Boolean,指出應用程式是否應該繼續啟動。

備註

根據預設,這個方法會引發 Startup 事件。 事件處理程式可以設定 Cancel 事件自變數的屬性。 如果 為 CancelTrue,這個方法會 False 傳回以取消應用程式啟動。 否則,這個方法會傳回 True

適用於

另請參閱