How to Get Active Process Name in C#?
<p>How to get active process name in C#?</p>

<p>I know that I must use this code:</p>

<pre><code>[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
</code></pre>

<p>but I don't know how use it.</p>
