While I'm not sure I understand exactly what you are doing, either :), I have had no trouble implementing code like this:
1. in the primary Application:
private string path =
@"ValidPathToExe of Secondary App";
private void button1_Click(object sender, EventArgs e)
{
Process.Start(path, @"http://www.google.com");
}
2. in the secondary Application with a WebBrowser Control:
private void Form1_Load(object sender, EventArgs e)
{
string[] args = Environment.GetCommandLineArgs();
if (args.Length > 0)
{
if (args.Length > 1)
{
Uri uriResult;
bool result = Uri.TryCreate(args[1], UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp
|| uriResult.Scheme == Uri.UriSchemeHttps);
if (result)
{
webBrowser1.Navigate(args[1]);
}
else
{
MessageBox.Show("invalid url");
}
}
}
else
{
MessageBox.Show("no valid file path received");
}
}
I am assuming that you could use standard properties of the 'Process Class to enable receiving notification Events from the secondary Process' Form ... like EnableRaisingEvents, creating a handler for the OutputDataReceived Event, re-directing standard output, etc.
If this response is "way off," just let me know, and I'll delete it.
An interesting asynchronous overlay for working with .NET processes: [
^]. Article about development of MedallionShell here: [
^].