wasale Posted June 16, 2003 Posted June 16, 2003 I have made a very little game which implements one aircraft dodges many bullets coming from all direction.I create such a game by C#&Directx9,however, I have no idea how to detect users press 2 keys(i.e,left arrow and up arrow) at the same time. Maybe it is a very simple problem to you,but to me it is a hot potato:) Any Robin Hoods can give me a hand? Quote
*Experts* mutant Posted June 16, 2003 *Experts* Posted June 16, 2003 You cant do it with standard keyboard events because they only pass in one keycode, I think you would have to invest some time in learning DirectInput :). Quote
*Gurus* divil Posted June 16, 2003 *Gurus* Posted June 16, 2003 Take a look at the GetAsyncKeyState API, it does what you need. You'll have to use p/invoke to use it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
wasale Posted June 16, 2003 Author Posted June 16, 2003 Thanks a lot!! I'll try the above 2 answers , and I'll let both of helpers know my result as soon as possible. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.