Disable double click on control

hi, i recently remember to saw an option something like AllowDoubleClick and was a boolean, the thing is that i need a control to be disabled the double click option, becasue i want that the click event works on every click, so when u double click fast it makes the action twice, if u dont know what im talking about create a form with a panel. and a label.. then create the event on click for the panel, and change the text of the label on click of panel,, u will se that when u double click it just work once, this is why i need to find this property , does anybody knows how

thx

mig16


Answer this question

Disable double click on control

  • vuloc_nguyen

    Dear mig 16,

    i got two ways:

    1,the better one:

    add the following into your code:

    myControl.SetStyle (ControlStyles.StandardDoubleClick, false);

    2,implement it as the same result:

    write the code twice in your double click event handler.

    Though it looks not so good ,it works:)



  • Disable double click on control