Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft