TextBox_Click事件不适用于带有 Visual Studio 2008 的 .NET Framework 3.



TextBox_Click 事件不适用于带有 Visual Studio 2008 的 .NET Framework 3.5。

它给出错误textbox_Click 匹配委托 System.EventHandler 的重载。

你能帮我这个吗?如果没有,除了Text_Click,还有什么替代的吗?

还有TextBox_Click、TextBox_Select TextBox_GotFocus有什么区别。

private void pinInput_Click(object sender, KeyEventArgs e) 
{ 
//If already there is a text inside text box--set that textbox to empty so that user can enter another pin.
}

该错误显示在设计器中.cs在以下行:this.pinInput.Click += new System.EventHandler(this.pinInput_Click);

为事件调用的方法是

private void pinInput_Click(object sender, KeyEventArgs e) 
{ 
//If already there is a text inside text box--set that textbox to empty so that user can enter another pin.
}

只需更改

private void pinInput_Click(object sender, KeyEventArgs e) 
{ 
//If already there is a text inside text box--set that textbox to empty so that user can enter another pin.
}

private void pinInput_Click(object sender, EventArgs e) 
{ 
//If already there is a text inside text box--set that textbox to empty so that user can enter another pin.
}

最新更新