@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Checks the console for keyboard input. !!!!C# Signature: [DllImport("msvcrt.dll", CallingConvention=CallingConvention.Cdecl)] static extern int kbhit(); !!!!VB Signature: <DllImport("msvcrt.dll", CallingConvention:=CallingConvention.Cdecl)> _ Shared Function kbhit Lib "msvcrt.dll" () As Integer End Function !!!!User-Defined Types: None. !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: // Wait until the user presses a key. while (!kbhit()); !!!!Alternative Managed API: This is in the .NET 2.0 Console class functions System.Console.KeyAvailable() or System.Console.ReadKey(). System.Console.KeyAvailable() - Gets a value indicating whether a key press is available in the input stream. (Nonblocking) System.Console.ReadKey() - Obtains the next character or function key pressed by the user. Allows for both echoing key to screen or not. Documentation: kbhit@msdn on MSDN
Edit msvcrt.kbhit
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.