Click here to Skip to main content
15,885,546 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: A small Horror Pin
Nathan Tuggy2-Jul-09 6:08
Nathan Tuggy2-Jul-09 6:08 
GeneralRe: A small Horror Pin
Pete O'Hanlon2-Jul-09 2:28
mvePete O'Hanlon2-Jul-09 2:28 
GeneralRe: A small Horror Pin
PIEBALDconsult2-Jul-09 5:28
mvePIEBALDconsult2-Jul-09 5:28 
GeneralRefresh a list view... when ever new file comes into folder Pin
Nikkiee25-Jun-09 12:06
Nikkiee25-Jun-09 12:06 
GeneralRe: Refresh a list view... when ever new file comes into folder Pin
Fatbuddha 125-Jun-09 21:56
Fatbuddha 125-Jun-09 21:56 
GeneralRe: Refresh a list view... when ever new file comes into folder Pin
OriginalGriff25-Jun-09 22:04
mveOriginalGriff25-Jun-09 22:04 
GeneralRe: Refresh a list view... when ever new file comes into folder Pin
Fatbuddha 125-Jun-09 23:42
Fatbuddha 125-Jun-09 23:42 
GeneralNot quite sure what "is equal to" actually means... Pin
OriginalGriff25-Jun-09 1:24
mveOriginalGriff25-Jun-09 1:24 
From our own C# forum again:

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?


Um - what do they teach them? And why?

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

JokeNot quite sure what "==" | "&&" means surely? Pin
Keith Barrow25-Jun-09 3:05
professionalKeith Barrow25-Jun-09 3:05 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
Chris Meech25-Jun-09 3:06
Chris Meech25-Jun-09 3:06 
GeneralMessage Removed Pin
25-Jun-09 3:09
MadProgrammer7625-Jun-09 3:09 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
OriginalGriff25-Jun-09 3:32
mveOriginalGriff25-Jun-09 3:32 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
J4amieC25-Jun-09 3:50
J4amieC25-Jun-09 3:50 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
Fatbuddha 125-Jun-09 23:47
Fatbuddha 125-Jun-09 23:47 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
TheNexpert3-Jul-09 0:42
TheNexpert3-Jul-09 0:42 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
puromtec17-Jul-09 7:58
puromtec17-Jul-09 7:58 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
Megidolaon17-Jul-09 9:50
Megidolaon17-Jul-09 9:50 
GeneralRe: Not quite sure what "is equal to" actually means... Pin
puromtec117-Jul-09 17:02
puromtec117-Jul-09 17:02 
GeneralA piece of ... Art Pin
Jeremy Tierman17-Jun-09 10:14
Jeremy Tierman17-Jun-09 10:14 
GeneralRe: A piece of ... Art Pin
Luc Pattyn17-Jun-09 10:57
sitebuilderLuc Pattyn17-Jun-09 10:57 
GeneralRe: A piece of ... Art Pin
PIEBALDconsult17-Jun-09 11:00
mvePIEBALDconsult17-Jun-09 11:00 
GeneralRe: A piece of ... Art Pin
Luc Pattyn17-Jun-09 11:02
sitebuilderLuc Pattyn17-Jun-09 11:02 
GeneralRe: A piece of ... Art Pin
Jeremy Tierman17-Jun-09 11:29
Jeremy Tierman17-Jun-09 11:29 
JokeRe: A piece of ... Art Pin
killabyte17-Jun-09 21:21
killabyte17-Jun-09 21:21 
GeneralRe: A piece of ... Art Pin
Brady Kelly17-Jun-09 21:56
Brady Kelly17-Jun-09 21:56 

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.