On a form in my project I have about 20 or so text boxes that I use to display data. As we all know when you press the "TAB" key it advances the focus to the next control based on it's TabIndex value. My problem is that when I press the "SHIFT TAB" key conbination the focus may go back to the previous control the first or second time, but rarely works correctly again if I press "SHIFT TAB" again. What I'm looking for a way to assign focus to a control by using it's TabIndex value.
For example: Form1.SetFocus = 3
This action would set focus on the control that has been assigned a TabIndex value of 3. This example doesn't work (of course) but I am looking for something similar.
Thanks in advance.


Reply With Quote