/// <summary> /// For Enter key and backspace navigation /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbBank_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { cmbBank.Text = strBankNameText; txtcheckNo.Focus(); txtcheckNo.SelectionStart = 0; txtcheckNo.SelectionLength = 0; } else if (e.KeyCode == Keys.Back) { if (cmbBank.Text == string.Empty || cmbBank.SelectionStart == 0) { txtAmount.Focus(); txtAmount.SelectionStart = 0; txtAmount.SelectionLength = 0; } } else if (e.Alt && e.KeyCode == Keys.C) { SendKeys.Send("{F10}"); btnNewAccountLedger2_Click(sender, e); } if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //Pop Up { if (cmbBank.Focused) { cmbBank.DropDownStyle = ComboBoxStyle.DropDown; } else { cmbBank.DropDownStyle = ComboBoxStyle.DropDownList; } if (cmbBank.SelectedIndex != -1) { frmLedgerPopupObj = new frmLedgerPopup(); frmLedgerPopupObj.MdiParent = formMDI.MDIObj; frmLedgerPopupObj.CallFromPdcReceivableVoucher(this, Convert.ToDecimal(cmbBank.SelectedValue.ToString()), "Bank"); this.Enabled = false; } else { Messages.InformationMessage("Select any Bank account"); cmbBank.Text = string.Empty; } } } catch (Exception ex) { MessageBox.Show("PR49:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }