Ctrl + a 의 경우 해당 component에 KeyDown event로써 발생하게 되어 있다.


다음과 같은 EventHandler를 등록 시키면 사용이 가능하다.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
private void textBox_KeyDown(object sender, KeyEventArgs e)
{
    if (e.Control)
    {
        if (e.KeyCode == Keys.A)
        {
            this.textBoxPlainText.Focus();
            this.textBoxPlainText.SelectAll();
        }
    }
}


+ Recent posts