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
.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om