I'm working on a winforms project where I need to display text and imagery when a mouse click is detected, but I"m running into a few problems. I cannot consistently detect mouse clicks. Here's a basic overview of the program, first the main form loads. Then the user loads another form to set up options. Once that is done, the other form is closed and the main form gets focus. The main form is what should be receiving mouse input. Once a mouse click is detected, a function is called that uses ThreadPool.QueueUserWorkItem
to play sound and display imagery.
What happens is that mouse clicks are sometimes ignored in the main form. Usually the first click is ignored, then I'd say more than half of future mouse clicks are ignored. I've added code to notify me when MouseUp fires in the event handler, so I'm certain the event handler is not getting called. I've also set this.Capture = true;
in the main form, so I'm not quite sure why some mouse clicks are being ignored. Is there anything that could be interfering with mouse clicks?