按下数字键1怎么样响应botton_click事件
win mobile:
private void b_setTermNo_Click(object sender, EventArgs e)
{
setTermNo frm61 = new setTermNo();
frm61.Show();
}
private void setTing_KeyPress(object sender, KeyPressEventArgs e)
{
//if (e.KeyChar == '1')
//{
// setTermNo frm61 = new setTermNo();
// frm61.Show();
//}
if (e.KeyChar == '1')
{
b_setTermNo_Click
}
}
请问"if (e.KeyChar == '1')"这里的内容应该怎么样写?
------解决方案--------------------b_setTermNo_Click(buuton1, EventArgs.Empty)
------解决方案--------------------b_setTermNo_Click(null, null);