Reputation: 13
I'm making a craps game, and I have a "Craps Table" image in a PictureBox Control.
I've made a MouseClick event handler for the PictureBox to check what region was selected by the user, and add a bet to that "Part of the Craps Table" when clicked.
Everything works great, except if I click the region very quickly, the event fires only once for every two clicks (Approx).
I've searched everywhere, and not quite sure what I'm doing wrong. I thought at first it might be a graphics problem, but I've ruled just about everything out, and I'm thinking that the event simply isn't firing properly at high click speeds, I have to pause for half a second between clicks for it to fire.
Thanks for any advice..
Upvotes: 1
Views: 449
Reputation: 15217
Also guessing, Try MouseDown instead of MouseClick...
Another thing to check: If your app is high-cpu intensive, and the UI thread is mostly busy, the mouse events will arrive late.
Upvotes: 2
Reputation: 9265
My guess is that by clicking very quickly, you're triggering the doubleclick event instead of click
Upvotes: 1