PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Check box focus problem on smartphone
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Check box focus problem on smartphone
![]() |
Check box focus problem on smartphone |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi, i have a simple VS2005 vb.net cf v1app with 4 checkbox controls
on a form. I want to use the joystick on the smartphone WM5 to navigate between the controls. However when i try to change focus from the Checkbox1 which seems to automatically have the focus when the the form is loaded it doesn't move from it. If i hit the left key on the joystick i see that Checkbox 2 temporarily gets the focus as implemented in my code below but after the event handler completes it return to Checkbox 1. Can someone please point out what i am doing wrong. Thanks Private Sub CheckBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CheckBox1.KeyDown Select Case e.KeyCode Case Keys.Down CheckBox3.Focus() Case Keys.Up CheckBox3.Focus() Case Keys.Left CheckBox2.Focus() Case Keys.Right CheckBox2.Focus() Case Keys.Return End Select End Sub |
|
|
|
#2 |
|
Guest
Posts: n/a
|
you must handled the event, before you move the focus,
e.handled=true try it dev15 escribió: > Hi, i have a simple VS2005 vb.net cf v1app with 4 checkbox controls > on a form. I want to use the joystick on the smartphone WM5 to navigate > between the controls. However when i try to change focus from the > Checkbox1 which seems to automatically have the focus when the > the form is loaded it doesn't move from it. If i hit the left key on the > joystick > i see that Checkbox 2 temporarily gets the focus as implemented in my > code below but after the event handler completes it return to Checkbox 1. > Can someone please point out what i am doing wrong. > > Thanks > > Private Sub CheckBox1_KeyDown(ByVal sender As System.Object, ByVal e As > System.Windows.Forms.KeyEventArgs) Handles CheckBox1.KeyDown > > Select Case e.KeyCode > > Case Keys.Down > > CheckBox3.Focus() > > Case Keys.Up > > CheckBox3.Focus() > > Case Keys.Left > > CheckBox2.Focus() > > Case Keys.Right > > CheckBox2.Focus() > > Case Keys.Return > > End Select > > End Sub > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hi,
Did you try to change the tabIndex of your controls? BR Fabien Decret Windows Embedded Consultant ADENEO (ADESET) http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/ On 22 juin, 11:01, David caso <david.soporte.esto.lo.quitas.sico.es> wrote: > you must handled the event, before you move the focus, > e.handled=true > try it > > dev15 escribió: > > > > > Hi, i have a simple VS2005 vb.net cf v1app with 4 checkbox controls > > on a form. I want to use the joystick on the smartphone WM5 to navigate > > between the controls. However when i try to change focus from the > > Checkbox1 which seems to automatically have the focus when the > > the form is loaded it doesn't move from it. If i hit the left key on the > > joystick > > i see that Checkbox 2 temporarily gets the focus as implemented in my > > code below but after the event handler completes it return to Checkbox 1. > > Can someone please point out what i am doing wrong. > > > Thanks > > > Private Sub CheckBox1_KeyDown(ByVal sender As System.Object, ByVal e As > > System.Windows.Forms.KeyEventArgs) Handles CheckBox1.KeyDown > > > Select Case e.KeyCode > > > Case Keys.Down > > > CheckBox3.Focus() > > > Case Keys.Up > > > CheckBox3.Focus() > > > Case Keys.Left > > > CheckBox2.Focus() > > > Case Keys.Right > > > CheckBox2.Focus() > > > Case Keys.Return > > > End Select > > > End Sub- Masquer le texte des messages précédents - > > - Afficher le texte des messages précédents - |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Hi , i tried this but it doesn't work
Private Sub CheckBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CheckBox1.KeyDown e.Handled = True Select Case e.KeyCode Case Keys.Down CheckBox3.Focus() Case Keys.Up CheckBox3.Focus() Case Keys.Left CheckBox3.Focus() Case Keys.Right Case Keys.Return 'Do your thing for joystick press End Select End Sub "David caso" <david.soporte.esto.lo.quitas.sico.es> wrote in message news:ebxC%23wKtHHA.4688@TK2MSFTNGP05.phx.gbl... > you must handled the event, before you move the focus, > e.handled=true > try it > > dev15 escribió: >> Hi, i have a simple VS2005 vb.net cf v1app with 4 checkbox controls >> on a form. I want to use the joystick on the smartphone WM5 to navigate >> between the controls. However when i try to change focus from the >> Checkbox1 which seems to automatically have the focus when the >> the form is loaded it doesn't move from it. If i hit the left key on the >> joystick >> i see that Checkbox 2 temporarily gets the focus as implemented in my >> code below but after the event handler completes it return to Checkbox 1. >> Can someone please point out what i am doing wrong. >> >> Thanks >> >> Private Sub CheckBox1_KeyDown(ByVal sender As System.Object, ByVal e As >> System.Windows.Forms.KeyEventArgs) Handles CheckBox1.KeyDown >> >> Select Case e.KeyCode >> >> Case Keys.Down >> >> CheckBox3.Focus() >> >> Case Keys.Up >> >> CheckBox3.Focus() >> >> Case Keys.Left >> >> CheckBox2.Focus() >> >> Case Keys.Right >> >> CheckBox2.Focus() >> >> Case Keys.Return >> >> End Select >> >> End Sub >> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

