Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Two Questions : Multiple key strokes and Pic.Flip or something similar
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
isaiahk9




PostPosted: 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
Sponsor
sponsor
Vertico




PostPosted: 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




PostPosted: 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




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: