Bewerken

Delen via


WindowsFormsApplicationBase.OnStartup(StartupEventArgs) Method

Definition

When overridden in a derived class, allows for code to run when the application starts.

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

Parameters

eventArgs
StartupEventArgs

The command-line arguments of the application and indicates whether the application startup should be canceled.

Returns

A Boolean that indicates if the application should continue starting up.

Remarks

By default, this method raises the Startup event. The event handler can set the Cancel property of the event argument. If Cancel is True, this method returns False to cancel the application startup. Otherwise, this method returns True.

Applies to

See also