regulardude
Programmer
Hi,
I am using the
SingleInstanceApplication: WindowsFormsApplicationBase
of the visual basic.dll in my c# application to get a single instance application.
I have seen numerous articles
with the help of these, I have only gotten the single instance part working, but not the passing of parameter from one instance of the form to the new instance of the form.
Can someone look at that part of my code and tell me what to do?
Thanks
I am using the
SingleInstanceApplication: WindowsFormsApplicationBase
of the visual basic.dll in my c# application to get a single instance application.
I have seen numerous articles
with the help of these, I have only gotten the single instance part working, but not the passing of parameter from one instance of the form to the new instance of the form.
Can someone look at that part of my code and tell me what to do?
Code:
static void StartupNextInstanceHandler(object sender, StartupNextInstanceEventArgs e)
{
// do whatever you want here with e.CommandLine...
int b = 0;
foreach (string i in e.CommandLine)
{
if (b == 1)
{
// I know that when b==1 that is the argument I need.
// but what to I do now?
break;
}
b++;
}
}
Thanks