Google Answers Logo
View Question
 
Q: capturing arrow keys in a .NET console application ( No Answer,   0 Comments )
Question  
Subject: capturing arrow keys in a .NET console application
Category: Computers > Programming
Asked by: chrisgwilliams-ga
List Price: $25.00
Posted: 15 Jul 2003 13:52 PDT
Expires: 14 Aug 2003 13:52 PDT
Question ID: 231362
I need example source code preferably in VB.NET, but I will accept C#
or even C++ as long as I can reference the method from VB.NET.

I need the code example to show me how to trap for the arrow keys in a
.NET console app. This last part is very important, it has to be for a
CONSOLE app, not a Windows Forms app.

I've done some research, and the existing console methods require an
enter keypress, which won't do what I need. I've also tried ConsoleEx
from GotDotNet, but it doesn't catch arrow keys either.

The proper solution will most likely involve setting the console mode
to character mode and making some API calls. But I need code. I would
strongly prefer it to be VB.NET, but I can use C# as well.

Request for Question Clarification by studboy-ga on 15 Jul 2003 14:23 PDT
Hi,

Have you looked at these hooks to Windows API?  Seems like
it can be done in VB.NET the same way--let me know if these works for you:

http://www.codeguru.com/vb_system/PK111802.html
http://www.developer.com/net/article.php/1502401

Clarification of Question by chrisgwilliams-ga on 16 Jul 2003 08:51 PDT
I will check into this tonight and see if I can make it work. I don't
think it will work though, as the console is handled completely
differently in .NET than VB6. Regardless I'll let you know.

Request for Question Clarification by studboy-ga on 19 Jul 2003 14:53 PDT
Hi Chris

Any update on this?  Thanks
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy