How to code while pressing the Ctrl+Tab Key in Windows Form?

How to code while pressing the Ctrl+Tab Key in Windows Form?

Thanks,

[76 byte] By [spth] at [2007-12-16]
# 1
Hi,

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

Vikram at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 2
Thanks, Vikram
spth at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms Designer...