コード例 #1
0
 private void VendorNametextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         PhonetextBox.Focus();
         e.Handled = true;
     }
 }
コード例 #2
0
        private void PhonetextBox_Leave(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(PhonetextBox.Text))
            {
                string PhnNo  = PhonetextBox.Text.Trim();
                int    Minlen = 8;



                if (!(PhonetextBox.Text.Length >= Minlen))
                {
                    MessageBox.Show("Please type your  valid Phone No.", "MojoCRM", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    PhonetextBox.Clear();
                    PhonetextBox.Focus();
                }
            }
        }