Hey,
I do it in the way similar to the way Richard did,
but I use "EntryPoint" so I can name my methods anything
I want:
<code>
using System;
using System.Runtime.InteropServices;
namespace SomeTest_CS_Console
{
/// <summary>
/// Summary description for GetChInterop.
/// </summary>
public class GetChInterop
{
[DllImport("msvcr71.dll", EntryPoint="_kbhit")]
public static extern int KbHit();
[DllImport("msvcr71.dll", EntryPoint="_getwch")]
public static extern int GetCh();
[DllImport("msvcr71.dll", EntryPoint="_getwche")]
public static extern int GetChe();
}
}
</code>
Make a managed dll once, and forget the pain in the neck...
On 18 Nov 2004 17:00:43 -0600, oketz1
<of**@myrealbox-dot-com.no-spam.invalid> wrote:
is there any function like this?
Console.Read is not good for me because I dont want to click Enter
after reading an input.
thanks ,
Okets
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
--
Regards,
Nurchi BECHED