解决TextBox Ctrl+A不能全选的问题

// 添加keyPress事件


private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == '\x1')
    {
        ((TextBox)sender).SelectAll();
        e.Handled = true;
    }
}

猜你喜欢

转载自www.cnblogs.com/alpha-w/p/10797922.html
今日推荐