This is quite simple .... just add the keyDown event like below:
this.txtField.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtField_KeyDown);
You should add this event for those textfield only where you want to add this functionality ... Now just add below simple code and enjoy select all feature :D
private void txtField_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && (e.KeyCode == Keys.A))
{
((TextBox)sender).SelectAll();
e.SuppressKeyPress = true;
e.Handled = true;
}
}
Try and enjoy :)
Saturday, October 22, 2011
Tuesday, October 4, 2011
Back again
Back again :)
After a long time I am back again and decided to post and write whatever I do. I will post basically technical terms in posts.....
Cheers
After a long time I am back again and decided to post and write whatever I do. I will post basically technical terms in posts.....
Cheers
Subscribe to:
Posts (Atom)