View Single Post
  #2 (permalink)  
Old 05-14-2008, 05:29 AM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 2,849
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