i want to design a software for a robot. i want to use the arrow keys of keyboard to direct the robot. can any one tell me that how can i do coding of that?
Jump to Post
Set KeyPreview as True on form properties.
Then add this following code :
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 'make sure KeyPreview is True on Form Properties 'On Error Resume Next Select Case KeyCode Case vbKeyUp MsgBox "Up" Case vbKeyDown MsgBox "Down" Case vbKeyLeft MsgBox …
All 5 Replies
Jx_Man 987 Nearly a Senior Poster Featured Poster
luckynisarg commented: Good +0
BenMarioCerisola 0 Newbie Poster
sofresh15 0 Newbie Poster
Sohail_4 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.