Software Development Network>> Windows Forms>> How to code while pressing the Ctrl+Tab Key in Windows Form?
this
How to code while pressing the Ctrl+Tab Key in Windows Form?
Thomas Lindquist
You need to add a event handler for the KeyDown Event. In the InitializeComponent, add the EventHandler as follows:
this
.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown);Inside the EventHandler you can check for the KeyCombination as follows:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (Keys.Tab == e.KeyCode && e.Control)
{
MessageBox.Show("CTRL + TAB Key Pressed");
}
}
Regards,
Vikram
SuperFox