Ejemplo n.º 1
0
        void numText_Validating(object sender, CancelEventArgs e)
        {
            NumericTextBox miTxt    = (NumericTextBox)sender;
            string         msjError = dicMsjError.First(item => item.Key == miTxt.Name).Value;

            if (string.IsNullOrEmpty(miTxt.Text))
            {
                e.Cancel = true;
                miTxt.Select(0, miTxt.Text.Length);
                this.errProvider.SetError(miTxt, msjError);
            }
        }
Ejemplo n.º 2
0
 private void Day_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter && Day.Focused)
     {
         Month.Focus();
         Month.Focus();
         Month.Select(0, 3);
     }
     else
     {
         CheckKeyUpDown(e, Day, 31);
     }
 }