obrien.james
Member
- Joined
- Sep 11, 2009
- Messages
- 15
- Programming Experience
- Beginner
Hi,
I have developed a program that I want to run as a single instance form, but I want to handle any new instances trying to occur and process their command line parameters. In the ApplicationEvents StartupNextInstance sub, I raise a custom event FSwitch().
[XCODE]Dim AppEventArgs As New ApplicationEventsArgs
AppEventArgs.FSwitch = True
AppEventArgs.FPath = FilePath
RaiseEvent FSwitch(AppEventArgs)[/XCODE]
In the programs main form's Load sub, I add a handler to the custom event:
[XCODE]AddHandler My.Application.FSwitch, AddressOf NewAutomaticEvent[/XCODE]
However, when I install the program, and go to load a new instance, the NewAutomaticEvent doesn't fire
I would try and debug this, but I don't know how to make a new instance during debugging.
I would greatly appreciate any help or advice
Thanks in advance
Jamse
I have developed a program that I want to run as a single instance form, but I want to handle any new instances trying to occur and process their command line parameters. In the ApplicationEvents StartupNextInstance sub, I raise a custom event FSwitch().
[XCODE]Dim AppEventArgs As New ApplicationEventsArgs
AppEventArgs.FSwitch = True
AppEventArgs.FPath = FilePath
RaiseEvent FSwitch(AppEventArgs)[/XCODE]
In the programs main form's Load sub, I add a handler to the custom event:
[XCODE]AddHandler My.Application.FSwitch, AddressOf NewAutomaticEvent[/XCODE]
However, when I install the program, and go to load a new instance, the NewAutomaticEvent doesn't fire
I would try and debug this, but I don't know how to make a new instance during debugging.
I would greatly appreciate any help or advice
Thanks in advance
Jamse