How do you programmaticall y shift focus to the next tab stop? i.e. I have a bunch of textboxes that all have their tab orders set in sequence. The user hits enter as they finish entering data in any of them, I want to programmaticall y move the user to the next textbox in the sequence.
Right now I'm using sendkeys to send the tab character, but there's just something about it I don't like...it seems kind of hokey. Is there a managed function call that I've missed somewhere?
Something of the style "Form1.Controls .NextControl.Se tFocus" (yes, I know this isn't a valid call, it was just an example)
Any ideas? Is there any other way to do this other than SendKeys?
It seems obvious that you grab the tab index of the current control, increment it to the next number, but then you need to grab the control that has tabstop marked as true and has the next tabindex. Is there an simple way of grabbing the list of tabstopped controls, or does this have to be achieved programmaticall y too?
Right now I'm using sendkeys to send the tab character, but there's just something about it I don't like...it seems kind of hokey. Is there a managed function call that I've missed somewhere?
Something of the style "Form1.Controls .NextControl.Se tFocus" (yes, I know this isn't a valid call, it was just an example)
Any ideas? Is there any other way to do this other than SendKeys?
It seems obvious that you grab the tab index of the current control, increment it to the next number, but then you need to grab the control that has tabstop marked as true and has the next tabindex. Is there an simple way of grabbing the list of tabstopped controls, or does this have to be achieved programmaticall y too?
Comment