Click here to Skip to main content
15,889,116 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: Expletive Deleted Pin
DeerBear20-Jul-13 7:43
DeerBear20-Jul-13 7:43 
GeneralRe: Expletive Deleted Pin
AspDotNetDev20-Jul-13 8:40
protectorAspDotNetDev20-Jul-13 8:40 
GeneralRe: Expletive Deleted Pin
DeerBear20-Jul-13 10:42
DeerBear20-Jul-13 10:42 
GeneralRe: Expletive Deleted Pin
AspDotNetDev20-Jul-13 16:39
protectorAspDotNetDev20-Jul-13 16:39 
GeneralRe: Expletive Deleted Pin
DeerBear20-Jul-13 22:31
DeerBear20-Jul-13 22:31 
JokeRe: Expletive Deleted Pin
AspDotNetDev21-Jul-13 6:39
protectorAspDotNetDev21-Jul-13 6:39 
GeneralRe: Expletive Deleted Pin
BC_programming12-Jul-13 1:16
BC_programming12-Jul-13 1:16 
GeneralRe: Expletive Deleted Pin
MSBassSinger12-Jul-13 3:36
professionalMSBassSinger12-Jul-13 3:36 
I agree that C#, and VB.NET, are much better than VB6. That is why I have not written new code in VB6 for years.

My approach, back in my VB6 days, was that if I had a performance bottleneck in my VB6 code that was not resource-related (disk I/O, RAM, etc.), then that code would get moved to C++ (or even C in some cases) to improve performance. But for Windows programming, VB6 was pretty much all that was needed. I wrote Windows services, COM+ servers, other middleware, as well as UI code with VB6. All worked well. Classes and OOP in VB6 was easily doable, for its day, so long as I took the time to know how things worked. I find OOP in C# and VB.NET is not only easier today, but has the additional functionality not available in VB6. Plus, I can write 64 bits apps, which I cannot in VB6.

Using CreateThread() in VB6 is not a bad idea, just one that requires a little knowledge. For example, I used a TLB for the thread API to bypass the runtime and go to OLE directly. The code I wrote for multithreaded VB6 apps was always stable and worked well. My code was adapted from some work Srideep Prasad did and posted on Planet Source Code back in the day.

VB6 was excellent for its day, did not deserve the reputation it had, and was the best Windows development language available then. But that was 12 years ago when .NET took its place.
GeneralRe: Expletive Deleted Pin
Zombie Code Monkey9-Jul-13 4:52
Zombie Code Monkey9-Jul-13 4:52 
GeneralRe: Expletive Deleted Pin
Rob Grainger9-Jul-13 4:59
Rob Grainger9-Jul-13 4:59 
GeneralRe: Expletive Deleted Pin
Zombie Code Monkey9-Jul-13 5:35
Zombie Code Monkey9-Jul-13 5:35 
GeneralRe: Expletive Deleted Pin
AspDotNetDev9-Jul-13 6:05
protectorAspDotNetDev9-Jul-13 6:05 
GeneralRe: Expletive Deleted Pin
PIEBALDconsult9-Jul-13 8:28
mvePIEBALDconsult9-Jul-13 8:28 
GeneralRe: Expletive Deleted Pin
Rob Grainger9-Jul-13 22:45
Rob Grainger9-Jul-13 22:45 
GeneralRe: Expletive Deleted Pin
Shameel10-Jul-13 4:38
professionalShameel10-Jul-13 4:38 
GeneralRe: Expletive Deleted Pin
Rob Grainger10-Jul-13 5:09
Rob Grainger10-Jul-13 5:09 
GeneralRe: Expletive Deleted Pin
AspDotNetDev10-Jul-13 5:15
protectorAspDotNetDev10-Jul-13 5:15 
GeneralRe: Expletive Deleted Pin
Ingo11-Jul-13 6:24
Ingo11-Jul-13 6:24 
GeneralRe: Expletive Deleted Pin
Corporal Agarn10-Jul-13 1:44
professionalCorporal Agarn10-Jul-13 1:44 
GeneralRe: Expletive Deleted Pin
Rob Grainger10-Jul-13 5:14
Rob Grainger10-Jul-13 5:14 
GeneralRe: Expletive Deleted Pin
ExcellentOrg10-Jul-13 20:38
ExcellentOrg10-Jul-13 20:38 
GeneralRe: Expletive Deleted Pin
Lee Chetwynd11-Jul-13 1:28
Lee Chetwynd11-Jul-13 1:28 
GeneralRe: Expletive Deleted Pin
donbsc11-Jul-13 3:41
donbsc11-Jul-13 3:41 
GeneralRe: Expletive Deleted Pin
RafagaX11-Jul-13 4:43
professionalRafagaX11-Jul-13 4:43 
GeneralRe: Expletive Deleted Pin
Rob Grainger15-Jul-13 23:05
Rob Grainger15-Jul-13 23:05 

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.