I am creating a simple ball and paddle program in C# and using mouse clicks to move the paddle. In order to register the mouse clicks, I have this
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
paddle.movePaddleRight();
this.Invalidate();
}
if (e.Button == MouseButtons.Left)
{
paddle.movePaddleLeft();
this.Invalidate();
}
}
The problem is that it doesn't register a rapid succession of clicks. After one click, it takes about half a second to register the next click (all clicks inbetween are lost). Is there a way for me to make the paddle move according to every click and register every click?
Actuation is achieved at the speed of light, generating the fastest response time in gaming at 0.2 milliseconds — 3 times faster than traditional mechanical switches.
Clicking fast produces the MouseDoubleClick event. Use the MouseDown event instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With