您的位置:首页 > 编程语言 > C#

C# textbox快捷键添加横杠

2016-04-02 18:28 295 查看
private void textBoxCinvcode_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.F12)

{

string temp = this.textBoxCinvcode.Text.Trim();

this.textBoxCinvcode.Text = temp + "-";

this.textBoxCinvcode.Select(temp.Length + 1, temp.Length + 1);

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: