Click here to Skip to main content
15,892,269 members
Home / Discussions / C#
   

C#

 
GeneralA brand new Bug in the .net datagrid :( Pin
livss23-Oct-03 7:27
livss23-Oct-03 7:27 
AnswerRe: Where is the Application Object? Pin
leppie23-Oct-03 7:09
leppie23-Oct-03 7:09 
AnswerRe: Where is the Application Object? Pin
shaunAustin26-Oct-03 21:56
shaunAustin26-Oct-03 21:56 
GeneralRe: Where is the Application Object? Pin
Anonymous28-Oct-03 6:33
Anonymous28-Oct-03 6:33 
QuestionWhere is the Application Object? Pin
Anonymous23-Oct-03 5:55
Anonymous23-Oct-03 5:55 
GeneralSized form for pocket pc Pin
Member 51467223-Oct-03 4:57
Member 51467223-Oct-03 4:57 
General_getch() Pin
viliam23-Oct-03 2:58
viliam23-Oct-03 2:58 
GeneralRe: _getch() Pin
Mike Dimmick23-Oct-03 3:31
Mike Dimmick23-Oct-03 3:31 
Your best bet is probably to write a DLL in C that performs any low-level input, then use the Platform Invoke feature to access that.

You can also P/Invoke _getch directly.
[DllImport("msvcr71.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int _getwch();

[STAThread]
static void Main(string[] args)
{
   Console.WriteLine( "Press any key to continue" );
   Console.Out.Flush();
 
   char ch = (char) _getwch();
 
   Console.WriteLine( "You pressed {0}", ch );
}
You must call Flush, because the Console class performs buffering on the stream. Failing to do so can cause the prompt to be displayed after _getwch executes, not before.

Note that I used the wide-character version, _getwch, because the CLR uses wide characters internally.
GeneralRe: _getch() Pin
J. Dunlap23-Oct-03 8:53
J. Dunlap23-Oct-03 8:53 
GeneralRe: _getch() Pin
leppie23-Oct-03 9:12
leppie23-Oct-03 9:12 
GeneralRe: _getch() Pin
J. Dunlap23-Oct-03 9:17
J. Dunlap23-Oct-03 9:17 
GeneralRe: _getch() Pin
shaunAustin26-Oct-03 21:58
shaunAustin26-Oct-03 21:58 
GeneralPlaying a simple sound with C# Pin
bsargos23-Oct-03 1:52
bsargos23-Oct-03 1:52 
GeneralRe: Playing a simple sound with C# Pin
Judah Gabriel Himango24-Oct-03 4:25
sponsorJudah Gabriel Himango24-Oct-03 4:25 
QuestionHow to configure an Ethernet connection? Pin
azazel1234523-Oct-03 1:28
azazel1234523-Oct-03 1:28 
AnswerRe: How to configure an Ethernet connection? Pin
Giles23-Oct-03 3:03
Giles23-Oct-03 3:03 
GeneralRe: How to configure an Ethernet connection? Pin
azazel1234523-Oct-03 4:04
azazel1234523-Oct-03 4:04 
GeneralRe: How to configure an Ethernet connection? Pin
Kentamanos23-Oct-03 7:36
Kentamanos23-Oct-03 7:36 
GeneralC# with Mac OS-X Pin
robi@robisoft.it23-Oct-03 0:48
robi@robisoft.it23-Oct-03 0:48 
GeneralRe: C# with Mac OS-X Pin
jparsons23-Oct-03 2:29
jparsons23-Oct-03 2:29 
GeneralRe: C# with Mac OS-X Pin
leppie23-Oct-03 7:16
leppie23-Oct-03 7:16 
GeneralRe: C# with Mac OS-X Pin
Giles23-Oct-03 3:07
Giles23-Oct-03 3:07 
GeneralRe: C# with Mac OS-X Pin
Mike Dimmick23-Oct-03 3:44
Mike Dimmick23-Oct-03 3:44 
GeneralRe: C# with Mac OS-X Pin
leppie23-Oct-03 7:14
leppie23-Oct-03 7:14 
GeneralRe: C# with Mac OS-X Pin
robi@robisoft.it24-Oct-03 21:44
robi@robisoft.it24-Oct-03 21:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.