03.12.2012, 18:20
Hello all.
On the last week, i have started learning c#.
And today, i have a small question, which i can't find the answer, or at least, it don't explain anything to me.
How can i check if the user is pressing the up / down key's?
On C, i could easly do:
And check if the key "80" and "72"(if i'm not changing the numbers for the left / right) have been "hitted" by the user.
Regards!
Ps: If you have any online link, which i could follow to my answer, i would be glad to have it.
On the last week, i have started learning c#.
And today, i have a small question, which i can't find the answer, or at least, it don't explain anything to me.
How can i check if the user is pressing the up / down key's?
On C, i could easly do:
PHP код:
#include <stdio.h>
#include <conio.h>
int main(void)
{
while(1)
{
if(kbhit())
{
int key = getch();
printf("%d", key);
}
}
return 1;
}
Regards!
Ps: If you have any online link, which i could follow to my answer, i would be glad to have it.