I looked in the help files for Borland C++ builder 6, but they didn't really help! ;(
I want to dected if:
key press:
<statement>
key down:
<statement>
and I need to know what key was pressed down
thx for the help!
I looked in the help files for Borland C++ builder 6, but they didn't really help! ;(
I want to dected if:
key press:
<statement>
key down:
<statement>
and I need to know what key was pressed down
thx for the help!
I think this is compiler and/or OS specific so post your compiler and OS.
>>I think this is compiler and/or OS specific so post your compiler and OS.
He already said he was using Borland, so he must be using a flavour of Windows.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
Ooops thats what you get for trying to answer somebody when your tired lol.
Borland C++ builder 6.0
Windows XP
this is what i'm doing know, but It doesn't want to workCode:if (GetAsyncKeyState(VK_CODE)==VK_LEFT ) { move_ship_left(User_Ship, Ship_sprite); } else if (GetAsyncKeyState(VK_CODE)==VK_RIGHT ) { move_ship_right(User_Ship, Ship_sprite); }
It's not working because you're using GetAsyncKeyState( ) improperly. You may want to have a look at the MSDN article on it.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
is this better?Code:if (GetAsyncKeyState(VK_LEFT )) { move_ship_left(User_Ship, Ship_sprite); } else if (GetAsyncKeyState(VK_RIGHT )) { move_ship_right(User_Ship, Ship_sprite); }
That should work.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie