From: AussieRules on
I have a number of controls on my form, set with tabindexs and tabstop set
to true.

My application runs on a touch screen, and I want the focus to move from one
control to the other when the user pushed a button.

Is there a way to move the focus to the next control based on its tabstop
being the next highest ?

thanks

From: Armin Zingler on
Am 13.05.2010 15:36, schrieb AussieRules:
> I have a number of controls on my form, set with tabindexs and tabstop set
> to true.
>
> My application runs on a touch screen, and I want the focus to move from one
> control to the other when the user pushed a button.
>
> Is there a way to move the focus to the next control based on its tabstop
> being the next highest ?

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.selectnextcontrol.aspx

--
Armin
From: AussieRules on
Update:

I have been trying out the following idea :

i have declared

private currentcontrol as control in my forms declaration...

Then in the textbox.enter event i sent the current control to be the next
box.

Then the code behind my button does this:

Dim nextcontrol As Control
nextcontrol = Me.GetNextControl(currencontrol, True)

nextcontrol.Focus()

but this doesn't work for some reason...


"AussieRules" <nospam(a)nospam.com> wrote in message
news:uIAYeFq8KHA.3276(a)TK2MSFTNGP02.phx.gbl...
>I have a number of controls on my form, set with tabindexs and tabstop set
>to true.
>
> My application runs on a touch screen, and I want the focus to move from
> one control to the other when the user pushed a button.
>
> Is there a way to move the focus to the next control based on its tabstop
> being the next highest ?
>
> thanks
>

From: AussieRules on
Hi Armin,

Thanks for you reply.

I have tried out the solution you provided. but am having a problem.

The problem is that I am trying to move the focus from control to
control(text boxes) when the user pushes a form button. (its a touch screen
app so no keyboard)

I have declared a control (dim currentcontrol as control in my form), on the
control.enter I set this currentcontrol = to the control that has been
entered (currentcontrol = textbox)

The tab orders are all set properly.

When the user pushes the button on my form nothing happens.. the code behind
this button is:

currentcontrol.SelectNextControl(currentcontrol, True, True, False, True)

any tips on how to solve this ??




"Armin Zingler" <az.nospam(a)freenet.de> wrote in message
news:u1ZWDoq8KHA.5848(a)TK2MSFTNGP06.phx.gbl...
> Am 13.05.2010 15:36, schrieb AussieRules:
>> I have a number of controls on my form, set with tabindexs and tabstop
>> set
>> to true.
>>
>> My application runs on a touch screen, and I want the focus to move from
>> one
>> control to the other when the user pushed a button.
>>
>> Is there a way to move the focus to the next control based on its tabstop
>> being the next highest ?
>
> http://msdn.microsoft.com/en-us/library/system.windows.forms.control.selectnextcontrol.aspx
>
> --
> Armin