Im trying to make a small game in visual basic 6. It requires the moving of a command button depending on the different key inputs. I have the code working when you push other command buttons that this one moves but I cant figure out how to detect when either the wasd keys are pushed or the arrow keys. If someone could give me a code snippet for detecting key input thatd be awesome.

use the keydown,keypress, or keyup event of the command button and form (just in case the command button looses focus).

Good Luck