Prevent Duplicate Processes From System.Diagnostics.Process.Start()

  • Thread starter Thread starter Axe
  • Start date Start date
A

Axe

I use the following code to open an instance of IE (or the default browser
on a user's machine):

System.Diagonostics.Process.Start("URLToDisplay");

The URLToDisplay is an HTML file located on the user's machine in a known
directory. I put this code in a button click event which is displayed on
several windows forms. However, I'd like to know how to prevent multiple
browser's from starting. Each time the user clicks on the button, the
browser pops up fine but this happens every time. I'd like to know when the
browser that was opened in the process is still there and prevent duplicate
browers.

Any clues? I've searched the 'Net and my books and can't find much (or
anything) on this topic.

Axe
 
* "Axe said:
System.Diagonostics.Process.Start("URLToDisplay");

The URLToDisplay is an HTML file located on the user's machine in a known
directory. I put this code in a button click event which is displayed on
several windows forms. However, I'd like to know how to prevent multiple
browser's from starting. Each time the user clicks on the button, the
browser pops up fine but this happens every time. I'd like to know when the
browser that was opened in the process is still there and prevent duplicate
browers.

In the browser properties, you will have to check the option to reuse
browser windows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top