PDA

View Full Version : Keyboard Input - Visual Basic



Bhaji123Go
11-08-2002, 02:00 PM
Hi,

I want to use Keyboard Input in Visual Basic, to perform operations such as rotate a cube, I want to use the key "R" on the keyboard to do that.

Can anybody help?

Thanks

Bhaji

jono_123
11-08-2002, 10:19 PM
its been a while since i used vb but i think this will work:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyR Then
do_somthing
End If

End Sub