当首次按下键盘上某个键时发生事件。
例如
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Z)
{
jiang = "一等奖";
}
if (e.KeyCode == Keys.X)
{
jiang = "二等奖";
}
if (e.KeyCode == Keys.C)
{
jiang = "三等奖";
} }
------------来自凌波小屋的笔记
2021-07-27 02:17:13
当首次按下键盘上某个键时发生事件。
例如
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Z)
{
jiang = "一等奖";
}
if (e.KeyCode == Keys.X)
{
jiang = "二等奖";
}
if (e.KeyCode == Keys.C)
{
jiang = "三等奖";
} }
------------来自凌波小屋的笔记