Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


D-Pad Navigation Sample (?)


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2008, 11:56 PM
Dave Mitchell's Avatar
Newbie
 
Join Date: Mar 2008
Posts: 8
Default D-Pad Navigation Sample (?)

I have been trying to include D-Pad navigation in one of my projects and thanks to help from this group have made some progress. I thought I would post the finished example, but ran into a snag. I can use the D-Pad to cycle through several controls on a form, but am unable to use the center button (enter) to select the control. Ideally, when the center button was pressed, it would release control to the current control so further manipulation was possible. Is there a way to pass the center button so it isn't captured? Here is the sample.
Attached Files
File Type: sbp DPad HW Test.sbp (2.0 KB, 5 views)
Reply With Quote
  #2 (permalink)  
Old 05-14-2008, 05:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,815
Default

You shouldn't use HardKey here.
First set the form's KeyPreview property to true (with the Door library).
This is an example of navigating between two textboxes:
oFrm is an Object.
Code:
Sub Globals
    current = 1
End Sub

Sub App_Start
    Form1.Show
    ofrm.New1(false)
    ofrm.FromControl("Form1")
    ofrm.SetProperty("KeyPreview",true)
End Sub


Sub Form1_KeyPress (specialKey)
    If specialKey = cUpKey OR specialKey = cDownKey Then
        current = 1 + (current Mod 2)
        Control("TextBox" & current).Focus
    End If
End Sub
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
D-Pad Navigation Dave Mitchell Questions & Help Needed 4 05-02-2008 10:46 PM
Hex To Dec To Hex Sample badkarma Code Samples & Tips 0 04-01-2008 05:26 PM
Forum Navigation dennishea Questions & Help Needed 1 02-15-2008 06:52 PM
Desktop IDE: Sub tree navigation minimal bug Woinowski Bug Reports 0 01-16-2008 07:20 AM
GPS map navigation and routing zen Questions & Help Needed 11 10-08-2007 06:44 AM


All times are GMT. The time now is 05:27 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0