Dear All,

I am doing c# project,
I want to trap (detect) Tab key pressed on control.
If anybody knows then please reply me.

Thanking You

Dear All,

I am doing c# project,
I want to trap (detect) Tab key pressed on control.
If anybody knows then please reply me.

Thanking You

Simply add a KeyPressEventArgs to your controls and in your method do the following:
e being event:

if(e.KeyCode == 9)
{
          // do your stuff here.
}

You can refer to this table for ascii value references.

http://www.asciitable.com/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.