yes, but since the controls are left (arrow keys) right up down sorta thing, it doesn't work that well. I am using the following case statements:
CODE
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim KeySimp
KeySimp = KeyCode - 36
Select Case KeyCode
Case vbKeyLeft
If shpClientBox.Left - shpServerBox.Left = 1200 And Abs(shpClientBox.Top - shpServerBox.Top) <= 480 Then
Exit Sub
Else
If shpClientBox.Left > 0 Then
shpClientBox.Left = shpClientBox.Left - 120
SubmitCoords
Else
Exit Sub
End If
End If
Case vbKeyUp
If shpClientBox.Top - shpServerBox.Top = 480 And Abs(shpServerBox.Left - shpClientBox.Left) <= 1200 Then
Exit Sub
Else
If shpClientBox.Top > 0 Then
shpClientBox.Top = shpClientBox.Top - 120
SubmitCoords
Else
Exit Sub
End If
End If
Case vbKeyRight
If shpServerBox.Left - shpClientBox.Left = 1200 And Abs(shpServerBox.Top - shpClientBox.Top) <= 480 Then
Exit Sub
Else
If shpClientBox.Left < 5880 Then
shpClientBox.Left = shpClientBox.Left + 120
SubmitCoords
Else
Exit Sub
End If
End If
Case vbKeyDown
If Abs(shpServerBox.Top - shpClientBox.Top) = 480 And Abs(shpServerBox.Left - shpClientBox.Left) <= 1200 Then
Exit Sub
Else
If shpClientBox.Top < 2880 Then
shpClientBox.Top = shpClientBox.Top + 120
SubmitCoords
Else
Exit Sub
End If
End If
End Select
End Sub
the if thens within the cases are just some collision detection, don't mind them. but when i try to put this code in the text box and command button keydown events, it just doesn't work..(e.g., i hit arrow left and it switches focus to another button or text box like I hit the tab button or something).
Please help!
videege