A pointer-to-member is not valid for a managed class
<p>I have a Windows Form in Visual Studio C++. (CLR)</p>

<p>In the header file I declare <code>bool isRunning</code> (to find if notepad is running):</p>

<pre><code>private: 
    bool isRunning(LPCSTR pnotepad)
    {
        HWND hwnd;
        hwnd = FindWindow(NULL, pnotepad);
        if (hwnd != 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
</code></pre>

<p>Now on a checkbox, I want it to check if the process is running.</p>

<pre><code>private: System::Void checkBox2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {

if (bool application::GUI::isRunning)
    label1-&gt;Text = "cat";
</code></pre>

<p>I get this error: </p>

<blockquote>
  <p>a pointer-to-member is not valid for a managed class</p>
</blockquote>

<p>I tried changing it to <code>&amp;isRunning</code>. This gives me the same error as above and </p>

<blockquote>
  <p>illegal operation on bound member function expression</p>
</blockquote>

<p>How can I fix this?</p>