Using the TAB ORDER with ENTER KEY ?

  • Thread starter Thread starter thomaz
  • Start date Start date
T

thomaz

Hi, i use the TAB ORDER to move focus from one control to
another.
But it functions only pressing the TAB KEY.
To move focus using the ENTER KEY i use the KEY PRESS
method in all the objects of the Form.
There is a way to use the ENTER KEY with TAB ORDER without
the KEY PRESS method???
Thanks.
 
Thomaz,

What you will have to do is capture the keypress on the form. Then,
when you have that, if the keypress is an enter key, you can set the focus
on the control on the form that you want it to go to (using the
GetNextControl method on the Control class).

Hope this helps.
 
Nicholas;

thanks for your replay to my question

I will try to use the GetNextControl method.

Thomaz
-----Original Message-----
Thomaz,

What you will have to do is capture the keypress on the form. Then,
when you have that, if the keypress is an enter key, you can set the focus
on the control on the form that you want it to go to (using the
GetNextControl method on the Control class).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

thomaz said:
Hi, i use the TAB ORDER to move focus from one control to
another.
But it functions only pressing the TAB KEY.
To move focus using the ENTER KEY i use the KEY PRESS
method in all the objects of the Form.
There is a way to use the ENTER KEY with TAB ORDER without
the KEY PRESS method???
Thanks.


.
 
Back
Top