S Salvatore Di Fazio Nov 10, 2005 #1 Hi guys, How can I check what key was pressed on a console application? tnx
I Ignacio Machin \( .NET/ C# MVP \) Nov 10, 2005 #2 Hi, You have to use Console.Read , there is nothing like an event in a console as you do not have a message pump. cheers,
Hi, You have to use Console.Read , there is nothing like an event in a console as you do not have a message pump. cheers,
C Chris Dunaway Nov 10, 2005 #3 Ignacio said: You have to use Console.Read , there is nothing like an event in a console as you do not have a message pump. Click to expand... Console.Read requires you to type a line and press ENTER. It does not get the characters as you type them. New in .Net 2.0 is the ReadKey method and the KeyAvailable property.
Ignacio said: You have to use Console.Read , there is nothing like an event in a console as you do not have a message pump. Click to expand... Console.Read requires you to type a line and press ENTER. It does not get the characters as you type them. New in .Net 2.0 is the ReadKey method and the KeyAvailable property.