//public void ProcessFunctionKey(string _FunctionName,Object[] _Params) //{ // MethodInfo[] MIS = myTypes.GetMethods(); // foreach (MethodInfo Mi in MIS) // { // if (Mi.Name.Equals(_FunctionName)) // { // Object obj = Activator.CreateInstance(myTypes); // Object response = Mi.Invoke(obj, _Params); // //result = (bool)response; // break; // } // } //} #endregion #region Các sụ kiện liên quan đến phím tắt. protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { bool handled = false; ShortcutKey.LoadFormShortcutKey(this, keyData.ToString(), ref handled); return(handled || base.ProcessCmdKey(ref msg, keyData)); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { bool handled = false; //if (keyData.ToString().Equals("Escape")) // return true; if (keyData.ToString().Equals("Alt + F4")) { Application.Exit(); } ShortcutKey.LoadFormShortcutKey(this, keyData.ToString(), ref handled); //return base.ProcessCmdKey(ref msg, keyData); return(handled || base.ProcessCmdKey(ref msg, keyData)); }