How do I limit my Windows application to spawning a single instance of a process?
<p>I am working on a Windows application. I have created a help file (.chm) using a third party tool and I call it from the Windows application. The help file is invoked successfully when I click on <em>Help</em> menu item or press <kbd>F1</kbd> for the application.</p>

<p>The problem I am facing is that if I click on the menu item again or press <kbd>F1</kbd> (while the application is open and I have not closed the previous help file) it opens another instance of the help file.</p>

<p>Let me be clear by giving an example: I want it to be just like the "Solitaire" game. No matter how many times you press <kbd>F1</kbd> or the <em>Contents</em> menu item it shows only one help window.</p>

<p>I want to do same thing like "Solitaire". I don't want multiple instances to be created.</p>

<p>I hope you understood my problem. Please let me know if my query is wrong.
I have posted my code below.</p>

<pre><code>    ProcessStartInfo info;
    Process exeprocess;
</code></pre>

<p>The below code is in Help menuitem click event.</p>

<pre><code>    private void mnuContents_Click(object sender, EventArgs e)
     {
         string ApplicationPath=ConfigurationSettings.AppSettings["HelpFile"].ToString();
         info = new ProcessStartInfo(ApplicationPath);
         //Process.Start(info);
         exeprocess = Process.Start(info);
     }
</code></pre>
