Two Questions : Multiple key strokes and Pic.Flip or something similar
Author |
Message |
isaiahk9
|
Posted: Wed Oct 29, 2008 7:04 pm Post subject: Two Questions : Multiple key strokes and Pic.Flip or something similar |
|
|
Like the title says, I'm hoping somebody can help me with these 2 questions :
1. I know that you can detect keyboard input with something along the lines of :
If KeyAscii = # Then
But what if I wanted to check if the user was holding the J key and the left arrow key (for example), how would I do that?
2. Supposing I was making a program with over 200 sprites for one character, all facing left. But, if I wanted to have those sprites also facing right, is there a way to do that without having to add another 200 sprites. Basically, is there a way to horizontally flip a Picturebox?
Oh, this is for VB 5 or 6 (doesn't matter which one). Thanx |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Vertico
|
Posted: Wed Oct 29, 2008 9:18 pm Post subject: Re: Two Questions : Multiple key strokes and Pic.Flip or something similar |
|
|
1)
All you need to do is check to see if one key is pressed AndAlso another.
Put this into a keyDown event to check for the input.
code: | If e.KeyCode = Keys.E AndAlso e.Control = True Then
MsgBox("Ctrl+E was pressed")
End If |
Though I am not sure what you want it for, so this could or could not help depending on your needs.
About the image, you can mirror an image vertically by reversing the order of the scanlines. I am not entirely sure how to do it in VB, (haven't used VB in a while) but I can look into it for you. |
|
|
|
|
|
isaiahk9
|
Posted: Thu Oct 30, 2008 5:27 am Post subject: RE:Two Questions : Multiple key strokes and Pic.Flip or something similar |
|
|
thanx, number 1 was what i was looking for.
but, i tried the second one already. If you can figure out a way to do it, you have my thanx. |
|
|
|
|
|
isaiahk9
|
Posted: Sun Nov 02, 2008 3:21 pm Post subject: RE:Two Questions : Multiple key strokes and Pic.Flip or something similar |
|
|
this thread is finished, I got what I was looking for |
|
|
|
|
|
|
|