private void DTPFromDate_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { DTPToDate.Focus(); e.Handled = true; } }
private void DTPFromDate_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (DTPFromDate.Value != null) { DTPToDate.Focus(); e.Handled = true; } else { MessageBox.Show("Fill the 'From Date' to continue...!", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }