用窗体生成器自动生成的代码
private void Form1_KeyDown(object sender, KeyEventArgs e) {
MessageBox.Show("af");
if (listBox1.Items.Contains(e.KeyCode)) {
listBox1.Items.Remove(e.KeyCode);
listBox1.Refresh();
//this part will increse the difficult of the game by putting down the interval
if (timer1.Interval > 400) timer1.Interval -= 10;
if (timer1.Interval > 250) timer1.Interval -= 8;
if (timer1.Interval > 100) timer1.Interval -= 2;
status.Update(true);
} else {
status.Update(false);
}
progressBar1.Value = 800 - timer1.Interval;
labelCorrect.Text = "correct: "+status.correct.ToString();
LabelMiss.Text = "missed: "+100;
labelTotal.Text = "total; "+status.total.ToString();
labelAccuracy.Text = "Accuracy: "+status.total.ToString();
}
按键之后程序无响应 对话框也弹不出来 求大神讲解