Click here to Skip to main content
15,888,454 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: Excellent stored procedure Pin
KarstenK23-Oct-07 0:39
mveKarstenK23-Oct-07 0:39 
GeneralSetFocus to a control that is probably disabled Pin
MarcR.10-Oct-07 7:09
professionalMarcR.10-Oct-07 7:09 
GeneralRe: SetFocus to a control that is probably disabled Pin
Dave Kreskowiak10-Oct-07 7:14
mveDave Kreskowiak10-Oct-07 7:14 
GeneralRe: SetFocus to a control that is probably disabled Pin
MarcR.10-Oct-07 7:51
professionalMarcR.10-Oct-07 7:51 
JokeRe: SetFocus to a control that is probably disabled Pin
Big Daddy Farang10-Oct-07 12:53
Big Daddy Farang10-Oct-07 12:53 
GeneralRe: SetFocus to a control that is probably disabled Pin
NormDroid11-Oct-07 4:13
professionalNormDroid11-Oct-07 4:13 
GeneralRe: SetFocus to a control that is probably disabled Pin
Ganesan Sankaran19-Oct-07 1:59
Ganesan Sankaran19-Oct-07 1:59 
GeneralRe: SetFocus to a control that is probably disabled Pin
BrowniePoints22-Oct-07 15:43
BrowniePoints22-Oct-07 15:43 
The question is, why would you want to imperatively set focus on a potentially disabled control?

It's like, are you giving a user a listbox that lists all of the controls on the form and when they select one, you set focus to it? I mean I could see how that's useful...like if you have 20 thousand controls on the form. But here's the real question...Why would you want to make a disabled control enabled?

Maybe it was a handler for a checkbox and when the user checks the box, it enables a previously disabled control and sets the focus so the user...can...oh wait, it disables the control before the user can do anything.D'Oh! | :doh:

WTF?Confused | :confused:
GeneralSo stingy! Pin
Muammar©7-Oct-07 0:48
Muammar©7-Oct-07 0:48 
GeneralWho needs event handlers... Pin
FyreWyrm5-Oct-07 16:31
FyreWyrm5-Oct-07 16:31 
GeneralRe: Who needs event handlers... Pin
Anton Afanasyev5-Oct-07 22:24
Anton Afanasyev5-Oct-07 22:24 
GeneralRe: Who needs event handlers... Pin
Mustafa Ismail Mustafa10-Oct-07 0:23
Mustafa Ismail Mustafa10-Oct-07 0:23 
GeneralNew basic syntax Pin
bigbrownbeaver5-Oct-07 1:56
bigbrownbeaver5-Oct-07 1:56 
GeneralRe: New basic syntax Pin
PIEBALDconsult5-Oct-07 4:42
mvePIEBALDconsult5-Oct-07 4:42 
GeneralRe: New basic syntax Pin
bigbrownbeaver5-Oct-07 5:05
bigbrownbeaver5-Oct-07 5:05 
GeneralRe: New basic syntax Pin
Luc Pattyn5-Oct-07 5:13
sitebuilderLuc Pattyn5-Oct-07 5:13 
GeneralWhy is my code so slow? Pin
Humble Programmer2-Oct-07 5:01
Humble Programmer2-Oct-07 5:01 
GeneralRe: Why is my code so slow? Pin
Albu Marius2-Oct-07 5:13
Albu Marius2-Oct-07 5:13 
GeneralRe: Why is my code so slow? Pin
jhwurmbach2-Oct-07 6:16
jhwurmbach2-Oct-07 6:16 
GeneralRe: Why is my code so slow? Pin
KarstenK3-Oct-07 20:55
mveKarstenK3-Oct-07 20:55 
GeneralRe: Why is my code so slow? Pin
M@dHatter6-Oct-07 3:55
M@dHatter6-Oct-07 3:55 
JokeRe: Why is my code so slow? Pin
Muammar©7-Oct-07 0:58
Muammar©7-Oct-07 0:58 
GeneralRe: Why is my code so slow? Pin
Dan Neely8-Oct-07 2:25
Dan Neely8-Oct-07 2:25 
GeneralRe: Why is my code so slow? Pin
Joe Programm3r25-Oct-07 6:28
Joe Programm3r25-Oct-07 6:28 
GeneralRe: Why is my code so slow? Pin
Muammar©25-Oct-07 9:29
Muammar©25-Oct-07 9:29 

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.