Click here to Skip to main content
15,890,995 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.

 
RantSeriously? Why write it yourself PinPopular
JChrisCompton7-Jul-11 5:39
JChrisCompton7-Jul-11 5:39 
GeneralRe: Seriously? Why write it yourself Pin
BillW337-Jul-11 10:39
professionalBillW337-Jul-11 10:39 
GeneralRe: Seriously? Why write it yourself Pin
BobJanova7-Jul-11 23:08
BobJanova7-Jul-11 23:08 
RantAnd... Pin
JChrisCompton8-Jul-11 7:03
JChrisCompton8-Jul-11 7:03 
GeneralRe: Seriously? Why write it yourself PinPopular
TorstenH.8-Jul-11 3:10
TorstenH.8-Jul-11 3:10 
GeneralRe: Seriously? Why write it yourself Pin
Ra-one10-Jul-11 18:56
Ra-one10-Jul-11 18:56 
GeneralRe: Seriously? Why write it yourself Pin
TorstenH.10-Jul-11 23:43
TorstenH.10-Jul-11 23:43 
GeneralI feel dirty [modified] Pin
Dan Neely6-Jul-11 3:17
Dan Neely6-Jul-11 3:17 
EDIT: GAH! At some point between when I snagged the idea from msdn forums, tested, committed it, and posted this; and when I went back to work it decided to stop working. D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: I Graus VS!

EDIT2: No sooner do I make my first edit but it starts working again. Cry | :((

Just committed this kludge to svn because the winforms datagridview designer was written by an idiot.

C#
/// <summary>
/// Works around a bug in the form designer.  Doesn't do any painting logic.
/// </summary>
/// <param name="sender">Unused.</param>
/// <param name="e">Unused.</param>
/// <remarks>
/// Is putting this line here to stop columns from auto-generating in the designer a WTF?
/// Yes, but so is this being the only way to do it if you want anything other than 100% default
/// datbound columns without having to do all the grid layout without the aid of the designer.
/// The AutoGenerateColumns property can't be set in the designer and the constructor is already too late.
/// </remarks>
private void DataGridView1Paint(object sender, PaintEventArgs e)
{
     dataGridView1.AutoGenerateColumns = false;
}

3x12=36
2x12=24
1x12=12
0x12=18

GeneralRe: I feel dirty Pin
BobJanova7-Jul-11 22:58
BobJanova7-Jul-11 22:58 
Questionexcel formula anyone Pin
fuximus5-Jul-11 16:46
fuximus5-Jul-11 16:46 
AnswerRe: excel formula anyone Pin
0bx5-Jul-11 22:45
0bx5-Jul-11 22:45 
GeneralRe: excel formula anyone Pin
fuximus5-Jul-11 22:53
fuximus5-Jul-11 22:53 
GeneralRe: excel formula anyone Pin
kwkonrad6-Jul-11 4:15
kwkonrad6-Jul-11 4:15 
AnswerRe: excel formula anyone Pin
phil.o6-Jul-11 4:45
professionalphil.o6-Jul-11 4:45 
GeneralRe: excel formula anyone Pin
0bx6-Jul-11 8:51
0bx6-Jul-11 8:51 
GeneralRe: excel formula anyone Pin
Klaus-Werner Konrad6-Jul-11 10:46
Klaus-Werner Konrad6-Jul-11 10:46 
GeneralRe: excel formula anyone Pin
phil.o6-Jul-11 22:58
professionalphil.o6-Jul-11 22:58 
GeneralRe: excel formula anyone Pin
myramla14-Jul-11 21:24
myramla14-Jul-11 21:24 
GeneralRe: excel formula anyone Pin
BobJanova14-Jul-11 22:25
BobJanova14-Jul-11 22:25 
GeneralRe: excel formula anyone Pin
phil.o15-Jul-11 2:13
professionalphil.o15-Jul-11 2:13 
AnswerRe: excel formula anyone Pin
StevenFoust19-Jul-11 5:28
StevenFoust19-Jul-11 5:28 
GeneralSpotted on The Daily WPF... Pin
Lutosław4-Jul-11 12:37
Lutosław4-Jul-11 12:37 
GeneralRe: Spotted on The Daily WPF... Pin
GenJerDan5-Jul-11 8:01
GenJerDan5-Jul-11 8:01 
GeneralSpotted on The Daily WTF... Pin
AspDotNetDev5-Jul-11 8:13
protectorAspDotNetDev5-Jul-11 8:13 
GeneralRe: Spotted on The Daily WTF... [modified] Pin
Lutosław5-Jul-11 10:32
Lutosław5-Jul-11 10:32 

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.