0

I have this command:

Process.Start(@"Chrome.exe", "http://192.168.1.2/url.aspx");

With this, I can open chrome with an URL, but if the application is already open, this command open a new tab, and I want to avoid this.

I want something like this:

private void button_Click(object sender, EventsArgs e)
{
    if(/*chrome is open*/)
    {
        //bring chrome to front and show the already opened tab;
    }
    else
    {
        //open a new window with url;
        Process.Start(@"Chrome.exe", "http://192.168.1.2/url.aspx");
    }

}

What should I do?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122

0 Answers0