Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WindowsFormsApplicationBase.OnStartup Method

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft