标签:
private void textBox_proc1value_KeyDown(object sender, KeyEventArgs e) { Keys key = e.KeyCode; if (e.Control!=true)//如果没按Ctrl键 return; TextBox textBox = sender as TextBox; switch (key) { case Keys.Up: textBox.Text = (int.Parse(textBox.Text.Trim()) + 1).ToString(); break; case Keys.Down: textBox.Text = (int.Parse(textBox.Text.Trim()) - 1).ToString(); break; } }
标签:
原文地址:http://www.cnblogs.com/fx427103/p/4245098.html