using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace QMAPP.WinForm { public class KeyEvent { public void SetKeyToTxt(Control c) { foreach (Control ctl in c.Controls) { if (ctl is TextBox) { if (ctl.Enabled == true) { ((TextBox)ctl).MouseDoubleClick += TxtKey_DoubleClick; } } SetKeyToTxt(ctl); } } public void TxtKey_DoubleClick(object sender, EventArgs e) { //QMAPP.WinForm.Forms.Common.TouchKey key = new Forms.Common.TouchKey((TextBox)sender); //key.ShowDialog(); } } }