private void lstVoucher_DoubleClick(object sender, EventArgs e) { uctxtVoucherNo.Text = lstVoucher.Text; textBox1.Text = lstVoucher.SelectedValue.ToString(); lstVoucher.Visible = false; TxtSalf.Focus(); }
private void uctxtVoucherNo_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return) { if (lstVoucher.Items.Count > 0) { uctxtVoucherNo.Text = lstVoucher.Text; textBox1.Text = lstVoucher.SelectedValue.ToString(); } lstVoucher.Visible = false; //uctxtVoucherNo.Focus(); TxtSalf.Focus(); } }