private void btnChangePassword_Click(object sender, EventArgs e) { frmChangePass fcp = new frmChangePass(); fcp.ShowDialog(); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.F1 && btnSales.Enabled == true) { pos.Show(); this.Hide(); return(true); // indicate that you handled this keystroke } if (keyData == Keys.F2 && btnOrder.Enabled == true) { order.Show(); this.Hide(); return(true); } if (keyData == Keys.F3 && btnCustomers.Enabled == true) { mdicus.Show(); this.Hide(); return(true); } if (keyData == Keys.F4 && btnInventory.Enabled == true) { mdiInv.Show(); this.Hide(); return(true); } if (keyData == Keys.F5 && btnGenReports.Enabled == true) { reports.Show(); this.Hide(); return(true); } if (keyData == Keys.F6 && btnGC.Enabled == true) { gc = new frmGiftCard(); gc.ShowDialog(); return(true); } if (keyData == Keys.F7 && btnUserAccounts.Enabled == true) { mdiUA.Show(); this.Hide(); return(true); } if (keyData == Keys.F8 && btnConfig.Enabled == true) { mdiConfig = new mdiConfiguration(); mdiConfig.ShowDialog(); return(true); } if (keyData == Keys.F9) { frmChangePass fcp = new frmChangePass(); fcp.ShowDialog(); return(true); } if (keyData == Keys.Escape) { this.closingForm(); return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }