PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Check box focus problem on smartphone

Reply

Check box focus problem on smartphone

 
Thread Tools Rate Thread
Old 22-06-2007, 09:55 AM   #1
dev15
Guest
 
Posts: n/a
Default Check box focus problem on smartphone


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


  Reply With Quote
Old 22-06-2007, 10:01 AM   #2
David caso
Guest
 
Posts: n/a
Default Re: Check box focus problem on smartphone

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
>
>

  Reply With Quote
Old 24-06-2007, 09:13 AM   #3
Fabien
Guest
 
Posts: n/a
Default Re: Check box focus problem on smartphone

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 -



  Reply With Quote
Old 25-06-2007, 05:56 PM   #4
dev15
Guest
 
Posts: n/a
Default Re: Check box focus problem on smartphone

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
>>


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off