WindowsFormsApplicationBase::OnStartup Method (StartupEventArgs^)

 

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

Namespace:   Microsoft.VisualBasic.ApplicationServices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

protected:
virtual bool OnStartup(
	StartupEventArgs^ eventArgs
)

Parameters

eventArgs
Type: Microsoft.VisualBasic.ApplicationServices::StartupEventArgs^

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

Return Value

Type: System::Boolean

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

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.

.NET Framework
Available since 2.0
Return to top
Show: