-2
如何在C#錯誤 '系統的Windows窗體KeyEventArgs'如何在C#錯誤keydown事件 '系統Windows窗體KeyEventArgs'
錯誤keydown事件:
'System.Windows.Forms.KeyEventArgs' does not contain a constructor that takes 0 argument ? how to create keydown event EXP>>>[![enter image description here][1]][1]
public event KeyEventHandler TextBoxKeyDow;
protected void OnTextBoxKeyDow()
{
if (TextBoxKeyDow != null)
{
TextBoxKeyDow(this,new KeyEventArgs());
}
}
學習google - > https://msdn.micros oft.com/en-us/library/system.windows.forms.control.keydown(v=vs.110).aspx –
刪除該代碼。然後在你的'Form'上找到'TextBox',查看屬性面板(F4)/事件標籤,然後雙擊'KeyDown'事件。 –
不,我創建了事件 – Pink