![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Sep 2004
Posts: 7
Rep Power: 0
![]() |
Hello,
My Visual Basic teacher assigned us a project. We have to make a pong game. I already know how to manipulate an object's position, but I need to know how to bind the directional keys to particular commands so the user can control a paddle. Thanks |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
In the Form Properties window, set KeyPreview to True. Then, in the Form_KeyDown method/procedure/function/whatever it's called now, you can simply use a Select/Case thingy to check whether KeyCode is equal to vbKeyUp, vbKeyDown, vbKeyLeft or vbKeyRight.
Hope that helps. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|