Sunday, September 26, 2010

Detecting Tab Control on the textBox in window application in C#

private void Form1_Load(object sender, EventArgs e)
{
textBox1.Multiline = true;
}

private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab)
{
MessageBox.Show("Tab Key is Pressed");
}
}