Bitmap help with VB.Net 2003
Ok I have a gotten a bitmap to be taken from file and put onto the form, how do i make it move around with the arrow keys?
you move the bitmap by incrementing/decrementing the coords as the arrow key is presssed. You are probably drawing your bitmap from the top left corner...so you know where these two points are, so
if(LEFT_ARROW_PRESSED)
{
BMP_X_COORD--;
}
if(UP_ARROW_PRESSED)
{
BMP_Y_COORD--;
}
and the reverse for the other two directions
if(LEFT_ARROW_PRESSED)
{
BMP_X_COORD--;
}
if(UP_ARROW_PRESSED)
{
BMP_Y_COORD--;
}
and the reverse for the other two directions
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement