I have a UserControl which acts like a basic button control (it is hand drawn).
I have noticed however that when I repeatedly click the control (fast) that I don't get all the click events that I would expect. If I click slowly I do get one click event per physical click.
Can anyone suggest why this is and how to fix the problem?
A UserControl is a collection of controls placed together to be used in a certain way. For example you can place a GroupBox that contains Textbox's, Checkboxes, etc. This is useful when you have to place the same group of controls on/in multiple forms or tabs.
Definition of C# User Control. C# user control is defined as an implementation in programming language of C# to provide an empty control and this control can be leveraged to create other controls. This implementation provides additional flexibility to re-use controls in a large-scale web project.
I think the clicks are converted into double clicks.
Try adding the following line to the constructor:
SetStyle(ControlStyles.StandardDoubleClick, false);
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