Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
Location
My.Application.StartupNextInstance Syntax
Public Sub Me_StartupNextInstance(ByVal sender As Object, _ ByVal e As StartupNextInstanceEventArgs) _ Handles Me.StartupNextInstance End Sub
Description
The StartupNextInstance event occurs in single-instance applications when subsequent instances of the application begin. The initial use of the application fires the Startup event, not the StartupNextInstance event. Non-single-instance applications never call the StartupNextInstance event. Public Members
The e argument to this event, as an instance of the StartupEventArgs class, includes the following notable public members.
Usage at a Glance
Example
The StartupNextInstance event's code appears in the ApplicationEvents.vb file in a Windows Forms application. Namespace My Class MyApplication Private Sub MyApplication_StartupNextInstance( _ ByVal sender As Object, ByVal e As _ Microsoft.VisualBasic.ApplicationServices. _ StartupNextInstanceEventArgs) _ Handles Me.StartupNextInstance Console.WriteLine("I'm already running!") End Sub End Class End Namespace
Related Framework Entries
See Also
Application Object, CommandLineArgs Property, Shutdown Event, Startup Event, UnhandledException Event |
Категории