If Typeof e.Sender Is WinForm.TextBox Then
Dim Index As Integer = CInt(e.Sender.Name.Replace("h",""))
Select Case e.KeyCode
Case keys.Down
e.Cancel = True
If Index <> 10 AndAlso Index <> 20 AndAlso Index <> 30 AndAlso Index <> 40 AndAlso Index <> 50 Then e.Form.Controls("h" & (Index+1)).Select
Case keys.Left
e.Cancel = True
If Index > 10 Then e.Form.Controls("h" & (Index-10)).Select
Case keys.Right
e.Cancel = True
If Index <= 40 Then e.Form.Controls("h" & (Index+10)).Select
Case keys.Up
e.Cancel = True
If Index <> 1 AndAlso Index <> 11 AndAlso Index <> 21 AndAlso Index <> 31 AndAlso Index <> 41 Then e.Form.Controls("h" & (Index-1)).Select
End Select
End If