Getting file path while opening winform app from context menu.
<p>I cant seem to get the correct file path when opening a file with my winform app from the right click menu. I would like to be able to right click a text file, run my program (c:\MyApp %1 in the regedit.exe) and have the file path appear in a message box before the program opens. Right now all I seem to get is the file path of my actual program. This is what I have so far. </p>

<pre><code>public partial class Form1 : Form
{
    public Form1()
    {   
       string[] args = Environment.GetCommandLineArgs(); 
       foreach (string arg in args)
       {
          MessageBox.Show(arg);
       }
       InitializeComponent();
    }
</code></pre>

<p>Any help would be greatly appreciated. I understand this is probably an easy fix but I am very new at this and might be missing something obvious. </p>

<p>Thank you. </p>
