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::OnStartupNextInstance Method (StartupNextInstanceEventArgs^)

 

When overridden in a derived class, allows for code to run when a subsequent instance of a single-instance application starts.

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

protected:
virtual void OnStartupNextInstance(
	StartupNextInstanceEventArgs^ eventArgs
)

Parameters

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

StartupNextInstanceEventArgs. Contains the command-line arguments of the subsequent application instance and indicates whether the first application instance should be brought to the foreground upon exiting the exception handler.

By default, this method raises the StartupNextInstance event. The event handler can set the BringToForeground property of the event argument. If BringToForeground is True, the method activates the main form. Otherwise, the main form is left in its current state.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft