Click here to Skip to main content
15,921,716 members
Home / Discussions / C#
   

C#

 
QuestionC# equivalent of getch () Pin
Jordanwb11-Sep-07 11:48
Jordanwb11-Sep-07 11:48 
AnswerRe: C# equivalent of getch () Pin
User 665811-Sep-07 12:14
User 665811-Sep-07 12:14 
GeneralRe: C# equivalent of getch () Pin
Jordanwb11-Sep-07 12:23
Jordanwb11-Sep-07 12:23 
AnswerRe: C# equivalent of getch () Pin
Dave Doknjas11-Sep-07 14:08
Dave Doknjas11-Sep-07 14:08 
GeneralRe: C# equivalent of getch () Pin
Jordanwb11-Sep-07 14:15
Jordanwb11-Sep-07 14:15 
GeneralRe: C# equivalent of getch () Pin
Dave Doknjas11-Sep-07 14:33
Dave Doknjas11-Sep-07 14:33 
GeneralRe: C# equivalent of getch () Pin
Jordanwb11-Sep-07 15:10
Jordanwb11-Sep-07 15:10 
GeneralRe: C# equivalent of getch () Pin
Brady Kelly11-Sep-07 22:11
Brady Kelly11-Sep-07 22:11 
Just respond to a KeyPress even - the application is already waiting for all kinds of input, and it would love to tell you if only you would listen. Basically, set the KeyPreview property of your main form to True, and then response to the KeyDown even from that form.

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
    if ((e.KeyCode == Keys.Left) || (e.KeyCode == Keys.Right))
        // Move left or right.
}


I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham


My New Blog

GeneralRe: C# equivalent of getch () Pin
Jordanwb12-Sep-07 8:33
Jordanwb12-Sep-07 8:33 
QuestionGet an object from a handle [modified] Pin
Skippums11-Sep-07 11:12
Skippums11-Sep-07 11:12 
AnswerRe: Get an object from a handle Pin
Luc Pattyn11-Sep-07 13:22
sitebuilderLuc Pattyn11-Sep-07 13:22 
GeneralRe: Get an object from a handle Pin
Skippums12-Sep-07 4:18
Skippums12-Sep-07 4:18 
GeneralRe: Get an object from a handle Pin
Luc Pattyn12-Sep-07 4:58
sitebuilderLuc Pattyn12-Sep-07 4:58 
QuestionCan I make a partial font in C#? Pin
Robert Royall11-Sep-07 11:05
Robert Royall11-Sep-07 11:05 
QuestionTextBox Pin
Assaf8211-Sep-07 10:31
Assaf8211-Sep-07 10:31 
AnswerRe: TextBox Pin
netJP12L11-Sep-07 10:55
netJP12L11-Sep-07 10:55 
GeneralRe: TextBox Pin
Assaf8211-Sep-07 16:38
Assaf8211-Sep-07 16:38 
GeneralRe: TextBox Pin
Malcolm Smart11-Sep-07 20:55
Malcolm Smart11-Sep-07 20:55 
Questionadding data trough datagridview to the sqlserver database Pin
NewToAspDotNet11-Sep-07 10:06
NewToAspDotNet11-Sep-07 10:06 
AnswerRe: adding data trough datagridview to the sqlserver database Pin
ss.mmm11-Sep-07 10:54
ss.mmm11-Sep-07 10:54 
AnswerRe: adding data trough datagridview to the sqlserver database Pin
Mairaaj Khan11-Sep-07 12:44
professionalMairaaj Khan11-Sep-07 12:44 
Questionhow to get proj file Pin
ss.mmm11-Sep-07 10:01
ss.mmm11-Sep-07 10:01 
AnswerRe: how to get proj file Pin
Judah Gabriel Himango11-Sep-07 10:13
sponsorJudah Gabriel Himango11-Sep-07 10:13 
GeneralRe: how to get proj file Pin
ss.mmm11-Sep-07 10:50
ss.mmm11-Sep-07 10:50 
Questioncustom combobox display issue Pin
arevans11-Sep-07 9:09
arevans11-Sep-07 9:09 

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.