I am developing C # in the .NET Framework. I already have an event on Button that happens with one click. I also want to have an event in Double Click for the same button.
How to create a Double click event on a button? I tried with this, but it does not work:
this.SetStyle(ControlStyles.StandardDoubleClick, true); this.button1.DoubleClick += new System.EventHandler(button1_DoubleClick); private void button1_DoubleClick(object sender, EventArgs e) { MessageBox.Show("You are in the Button.DoubleClick event."); }
source share