Tab Indexes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

vb.net 2005

im trying to move focus from one control to another using the tab index.
For varios reasons i don not want to use send keys or control.focus.
 
Peter Newman said:
im trying to move focus from one control to another using the tab index.
For varios reasons i don not want to use send keys or control.focus.

Well, calling the control's 'Focus' method is the preferred method. What
are the reasons you do not want to use this method?
 
what i want to do is when the user hits the return/enter key they tab to the
next control. However i want to put this in a class so that all forms can
inherit it
 
Peter said:
what i want to do is when the user hits the return/enter key they tab to the
next control. However i want to put this in a class so that all forms can
inherit it

Probably not best done in the Form, but in the Controls you place onto it.

Call [Control].SelectNextControl() in your override for OnKeyDown (or
OnKeyUp; I can never remember which until my program goes pop!)

Regards,
Phill W.
 
Back
Top