Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
GeneralRe: gui problem Pin
Pete O'Hanlon25-Jun-09 3:03
mvePete O'Hanlon25-Jun-09 3:03 
GeneralRe: gui problem Pin
Rajesh R Subramanian25-Jun-09 3:09
professionalRajesh R Subramanian25-Jun-09 3:09 
QuestionDate Format Pin
kibromg25-Jun-09 1:43
kibromg25-Jun-09 1:43 
AnswerRe: Date Format Pin
stancrm25-Jun-09 1:48
stancrm25-Jun-09 1:48 
AnswerRe: Date Format Pin
Manas Bhardwaj25-Jun-09 2:03
professionalManas Bhardwaj25-Jun-09 2:03 
QuestionHow to confirm user & pass with active directory Pin
treuveni25-Jun-09 1:31
treuveni25-Jun-09 1:31 
AnswerRe: How to confirm user & pass with active directory Pin
J4amieC25-Jun-09 1:52
J4amieC25-Jun-09 1:52 
QuestionKeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
Mc_Topaz25-Jun-09 1:12
Mc_Topaz25-Jun-09 1:12 
Hi!

In a simple game I'm creating, I need to trigger some methods when one of the arrow keys are pressed as well as the space key.

I'm using this code in the form to receive the keyboard inputs:

protected override void OnKeyDown(KeyEventArgs e)
{
            base.OnKeyDown(e);

            if (e.KeyCode == Keys.Up && e.KeyCode == Keys.Space)
                MessageBox.Show("UP & SPACE");
}


Nothing happens when I run the code. The OnKeyDown event don't seem to handle this condition at all.

How shall I solve this problem?
AnswerRe: KeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
OriginalGriff25-Jun-09 1:20
mveOriginalGriff25-Jun-09 1:20 
GeneralRe: KeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
Mc_Topaz25-Jun-09 6:08
Mc_Topaz25-Jun-09 6:08 
AnswerRe: KeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
stancrm25-Jun-09 1:50
stancrm25-Jun-09 1:50 
GeneralRe: KeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
Mc_Topaz25-Jun-09 6:12
Mc_Topaz25-Jun-09 6:12 
AnswerRe: KeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
Dan Neely25-Jun-09 2:33
Dan Neely25-Jun-09 2:33 
GeneralRe: KeyEventArgs question: Get one of the arrow keys and space key at the same time Pin
Mc_Topaz25-Jun-09 6:48
Mc_Topaz25-Jun-09 6:48 
QuestionPrinter Job status using PJL Pin
koppewar25-Jun-09 0:51
professionalkoppewar25-Jun-09 0:51 
Questiondrag and drop file and/or add note to window form calendar Pin
kyi kyi25-Jun-09 0:07
kyi kyi25-Jun-09 0:07 
QuestionHow to check if documents on shared folders are availiable? Pin
Succodimele24-Jun-09 23:42
Succodimele24-Jun-09 23:42 
AnswerRe: How to check if documents on shared folders are availiable? Pin
Sk9325-Jun-09 0:12
Sk9325-Jun-09 0:12 
AnswerRe: How to check if documents on shared folders are availiable? Pin
Mycroft Holmes25-Jun-09 0:49
professionalMycroft Holmes25-Jun-09 0:49 
QuestionUsage of Lambda Expression Pin
HarishBhattbhatt24-Jun-09 23:41
HarishBhattbhatt24-Jun-09 23:41 
AnswerRe: Usage of Lambda Expression Pin
led mike25-Jun-09 4:47
led mike25-Jun-09 4:47 
AnswerRe: Usage of Lambda Expression Pin
Niladri_Biswas25-Jun-09 6:03
Niladri_Biswas25-Jun-09 6:03 
QuestionCombobox control..........?? [modified] Pin
Hum Dum24-Jun-09 23:09
Hum Dum24-Jun-09 23:09 
AnswerRe: Combobox control..........?? Pin
padmanabhan N24-Jun-09 23:31
padmanabhan N24-Jun-09 23:31 
GeneralRe: Combobox control..........?? Pin
Hum Dum25-Jun-09 1:33
Hum Dum25-Jun-09 1:33 

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.