r/visualbasic • • Jun 20 '21

Why do I see so much VB6 stuff here?

I use VB.Net in a professional environment and have done for years. I have been working in VB since (I think) 1998. My understanding was that VB6 was dead, like LONG dead. We spent millions ripping out old VB6 applications years ago and yet on this sub reddit which I joined a few weeks back I am seeing loads of posts related to VB6, but also people learning VB6. Is it still alive and well in some corner of the world or have I stumbled upon a sub culture that I was unaware of? I haven't met any programmers in my line of work that use VB6 still so I am at a loss, or maybe I am sheltered in a section of the community and missing out on something cool. Any help in understanding what I am seeing is appreciated.

Stay safe and happy coding.

8 Upvotes

29 comments sorted by

3

u/MaxObjFn Jun 20 '21

VB6 looks a lot like VBA which is still alive and well. Maybe you are seeing that and confusing it. I dont think many build apps in VB6 anymore. Windows xp was the last operating system that the IDE works for so the hurdle to doing so is pretty high.

According to wikipedia, Microsoft ceased VB6 support in 2008. .Net came on the scene in 2002.

1

u/Tiggywiggler Jun 20 '21

Thank you for that. You may be right. I see posts like this: https://www.reddit.com/r/visualbasic/comments/nq696s/the_visual_basic_6_enterprise_installer_is/?utm_medium=android_app&utm_source=share and wonder why they are trying to install the IDE, but it could be in preparation to port over to .net.

1

u/YukonDude64 Jun 30 '21

They may be supporting legacy code that's still in use, too. Lots of that still out there.

3

u/thudly Jun 20 '21

It may also be due to the fact that some developers may be still using the old technology because that's what they first learned on and they're just used to it, like a mother tongue. I know some guys who still program in C.

My other theory was that some countries are behind in computer technology in general and still have VB6 installed on their schools' computers. I see a lot of VB6 questions where English does not seem to be the person's first language.

4

u/MaxObjFn Jun 20 '21

The reference to C is probably not a good one since it is still very relevant. I'd venture a lot of hardware drivers are still written in C or C++. Anything that is performance critical you can expect to see C or a similar language. Plus, I can program C / C++ on modern OS and hardware.

VB6 last worked on Windows XP which was released nearly 20 years ago. You have to go out of your way to program a VB6 program these days. Like, configuring and running virtual machine of Windows Xp to install a deprecated IDE and language to make a program that can only run 32 bit.

More than likely, you either inherited legacy code that isnt worth converting or you are not using VB6.

FWIW, I recently ported 200,000 lines of VB6 into VB.net. VB6 is dead.

1

u/Neo_Techni Sep 17 '21

VB6's IDE worked fine in Windows 7. I am having trouble in 10 though...

1

u/MaxObjFn Sep 18 '21

Found some info online that suggests windows 10 runs it too, but that's news to me. My work office maintained a windows XP image to run a commercially licensed VB6 ide. Regardless, unless you're tethered to VB6 because of some legacy monster that isnt worth converting, do yourself a favor and get cha some vb.net. Visual Studio is far superior as an IDE, and you know... it wasn't deprecated in 2005.

1

u/Neo_Techni Sep 18 '21

I'm running it in 10 but Windows 10's UHD monitor support is terrible. Since the app thinks it's running in a different resolution that the display, any element that hovers (tooltips, menus) aren't in the right location anymore. And the GUI to move elements around is completely broken.

BUT, VB6 still uses a ton less RAM than .NET.
I have a huge program in VB6 that uses a lot less RAM (and space on the hard drive) than the simple companion app in .NET that just sends Win10 notifications to the VB6 app. It's ridiculous. That also implies performance in VB6 is much better. Which is especially important as one of my programs is a realtime OCR engine.

And that's to say nothing of all the code I have in VB6. Making the .NET app was a massive pain, Windows wanted to fight with me on every step, and it doesn't help that the official documentation is wrong (ie: what parts of the Registry we should have access to, are backwards. VB6 however has access to it all.) .NET doesn't even have access to the directory the program is installed into! And don't give me that shit about "best design practices". I want to keep everything in a single folder to be organized/portable. Best design practice is to not make a mess of the hard drive. And it's my own program running on my own computer, let me do what the hell I want with it. Then there's asstastic shit like how .NET no longer wants to let you do network tasks in the main UI thread, and modal popups are no longer synchronous for the same reason. I dont want to have these fights with it.

And Android is copying these stupid decisions too! A simple messagebox now takes 3 lines of code, just to make modal popups synchronous again.

I'm tethered to VB6 because it's easier to use, any time I start a new program I already have tons of already-completed code that gets me started, and it's just better.

2

u/Outside_Being_2261 Nov 09 '21

I've done a bunch of bench marks. I do build automation for a living, and VB6 literally runs 300 times faster than .NET with the same code when doing work (like parsing a file). .NET is a pig!!!

1

u/Neo_Techni Nov 09 '21

That's hilarious/sad

2

u/sheen0 Jan 22 '24

I am interested in using vb6 in 2024. Are there any good resources to learn it. I tried to use both vb6 and .net to make a very simple app, and vb6 absolutely wins.

2

u/Neo_Techni Jan 22 '24

First and foremost you'll want the fix to add scrollwheel support to the IDE, as it's older than scrollwheels:
https://www.reddit.com/r/visualbasic/comments/10aq91u/cant_find_the_vb6_mouse_wheelexe_anywhere/

And then I'd go with this site:
https://www.thevbprogrammer.com/classic_vbtutorials.asp

And this is a ton of basic API that I use in almost every program: (note, this is not a real .bas file, it's just the code pasted into a text file, you'll need to make a new "Module" in VB and paste this into it) (second note: github will take a few minutes before making it public, so it may show error 404 depending on how fast you get to this)
https://neotechni.github.io/old/api.bas

If you want to get into any graphics, there's pretty much 3 levels of complexity VB will deal with:

  • GDI (the included API will get you started, as it's basically copying from one picture box to another) 24bit color. I have made games with this

  • GDI 2 (this will deal with PNGs, alpha blending) 32bit color. Not needed for games though

  • DirectX is really complex but it'll handle it

1

u/sheen0 Jan 22 '24

Oh, thank you so much. You are a lifesaver. Kudos.

1

u/Neo_Techni Jan 22 '24

You're welcome. If you need any other API don't hesitate to ask. I have literal decades of it saved. And while I hate being People's Google, Google gets more and more useless for this every year

2

u/sheen0 Jan 22 '24

Thank you, I appreciate your valued helpπŸ™πŸ™πŸ™. And yes, you are absolutely right about google, I feel it is not useful any more.

1

u/Neo_Techni Sep 19 '21

I just checked, the VB6 IDE running my program takes less RAM, than the .net companion program. It's that big of a difference.

6

u/KCLeeper Jun 20 '21

And some of us don't have millions to spend ripping old VB6 out. It works fine. IDE installed on Server 2012 and W10 Pro. New stuff all in . Net, however.

6

u/[deleted] Jun 21 '21

"VB6 is dead" so is VBA, Cobol and all the other dead languages that live on.

3

u/RJPisscat Jun 21 '21

u/thudly hit it. Most of the students that post are using VB6. Their instructors are unaware that VS 2019 is a free download for students and individuals; or their curricula are written to VB6; or their IT Department have locked down machines so that nothing new can be installed; or they can't download in their country all the pieces that they need; or their hardware can't support all the tools needed to develop in .Net.

They aren't using VB6 to build products for sale, or to put into production in their environment. They use it to teach and learn basic programming constructs. Sometimes they are also teaching databases but there was a recent post that I can infer was from an introduction to gaming programming.

2

u/thudly Jun 22 '21

Also, it's probably what they instructors are most familiar with.

2

u/JakDrako Jun 21 '21

Same reason you still see job offers for COBOL programmers: there's a metric shit-ton of VB6 code still running out there.

I don't know who's spending millions just to replace VB6 code, but it's been my experience that small private enterprises with a lot of working, tested VB6 code would rather keep it and support it than to invest and restart from scratch.

2

u/YukonDude64 Jun 30 '21

VB6 was (by far) the most popular programming language in business for years, and it doesn't surprise me much that it's still out there. I work in an enterprise that uses (multiple) products that depend on ActiveX controls. We're talking CURRENT software versions, in 2021.

Many developers felt a real sense of betrayal when MS dropped support and I've had the sense that many continued to write on the platform. For some, it was a deliberate decision made out of resentment.

1

u/kianbateman Jun 21 '21

as for what i think this is one of the problems. the VB6 community never separated from the VB.NET community and whenever you talk to programmers they you laugh when you say VB because they see only one community and one language. i left VB6 decades ago but wherever VB-community i go i always see VB6 related stuff... sigh.

1

u/VBNiya Dec 10 '21

It's been my observation that most people feel too much attachment to their experience and knowledge in VB6 so they invent all kinds of trash reasons to stay in that garbage, even in 2021! It's ridiculous the mental gymnastics VB6 die-hards would perform to convince themselves that VB6 is the best development environment ever made.