WindowsFormsApplicationBase.OnStartup(StartupEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.