共用方式為


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 A,表示應用程式是否應該繼續啟動。

備註

預設情況下,此方法會提高事件。Startup 事件處理器可以設定 Cancel 事件參數的屬性。 若 CancelTrue則此方法返回 False 以取消應用程式啟動。 否則,此方法返回 True

適用於

另請參閱