I was intrigued by this as I expected the clicks to be ignored once you had de-registered the MouseClick event.
However, I got this to work using the
Application.DoEvents[
^] method
private void button1_MouseClick(object sender, MouseEventArgs e)
{
button1.Enabled = false;
mc++;
System.Threading.Thread.Sleep(2000);
textBox1.AppendText("Click " + e.Clicks + ", Clicks: " + mc + "\n");
Application.DoEvents();
button1.Enabled = true;
}
Note there was no need for that
if(true)
statement and you are also resetting the click count each time