private void Mission_KeyDown(object sender, KeyEventArgs e,short i)
{
if (e.KeyCode == Keys.Enter)
{
//對i操作
}
}
這樣寫無法引用,求問有什麼辦法可以實現?
把i這個參數放進TextBox控件的Tag對像中傳入
private void Mission_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
TextBox tt = TextBox as sender; //對i操作
short i = (short) tt.tag;
}
}