0

I have simple app and I want to count mouse clicks anywhere on screen. I have code but it counts clicks only in area where is label.

        int count = 0;
        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            count++;
            mclickcounter.Text = count.ToString();
            //mclickcounter is label
        }

enter image description here

David d
  • 37
  • 5
  • Try this: https://stackoverflow.com/questions/11607133/global-mouse-event-handler – gigiabbrescia May 15 '21 at 17:38
  • Does this answer your question? [Global mouse event handler](https://stackoverflow.com/questions/11607133/global-mouse-event-handler) –  May 16 '21 at 14:04
  • Perhaps https://github.com/gmamaladze/globalmousekeyhook and https://github.com/Indieteur/GlobalHooks –  May 16 '21 at 14:08

0 Answers0