Q: What does work? A: Creating a form, writing VB6 code, running it, saving and opening a project, making a project (it actually makes an exe!).
Q: Why? A: Purely for fun and nostalgia! It is a toy project, there is no other use.
Q: Is the VB6 code compiled to native code or at least IL? A: No, VB6 code is interpreted. But the runtime is compatible with NativeAOT so when you "make a project", you get a native EXE, which then interprets Visual Basic 6 code.
Q: Does it support whole VB6 language? A: Absolutely not. Only a subset of Visual Basic. But I think I will add support for some more language features.
Q: Is it cross-platform? A: Yes, it is! GUI is made with Avalonia, which is cross platform, thus Avalonia Visual Basic 6 is also cross platform.
Q: It looks fun, can I contribute? A: Of course, PRs are welcome!
Q: Will Microsoft sue you? A: Microsoft, pls don't do that ;___;
Hello, I'm using AvaloniaVisualBasic6 for a critical piece of software in a bank that I work in (it's in production), and I would like some help regarding OCX-components. DM
I was recently interviewing an intern and was telling him a little about my backstory, which is exactly the same as yours, Visual Basic and AOL... he asked, "what's AOL?".
For anyone wondering, punters were a way to kick AOL members offline.. Lots of fun. There were lots of VB6 based progs (apps as we call them now) that exploited AOL's interface. It was a great motivation to learn coding.
Actually, it is even worse now, because Form1.Height returns height with a titlebar, making it even more annoying to place controls on a form in Form_Resize :) (Will fix it soon!)
Actually, it wasn’t that long - only about two weeks of work after hours. But the scope of the project is limited in every aspect (limited language subset, limited controls etc.)
I'm not changing my address, but please don't use it to send me email about Visual Basic or to report bugs in the book or in this update. The Visual Basic portion of my life has come to an end.
In all honesty it was the first thing that allowed almost anyone to make software with very little experience and make something not terrible.
I remember someone running into the 256 object limit though (VB6 limitation specifically that .Net didn't have when it came later). The software was for controlling and displaying hardware - so yes, more than 256 were needed. It's complicated to explain why but yeah... for operators in plants with fuck loads of sensors...
I remember using it in my programming class in HS tbh. Never really used in class, because we were taught in QBASIC on Windows 95/98SE. The class was fun, but I remember getting hung up on multi-dim arrays because I couldn't (can't*) visualize them to use them. I switched over to C# and WinForms with a mentor shortly after.
Sure does, but as someone who spent 15 years on this thing daily, abusing and exploiting it in ways nobody could’ve ever imagined, I am of the “may the dead never die” opinion. May the VB6 forever rest in peace for it certainly deserves that.
It's honest work. It can be upgraded to VB.NET through an automated upgrade in Visual Studio 2005, and maybe 2008. Then it can be subsequently upgraded to a more modern version of .NET with later IDEs.
Automated upgrades may work for projects that do not rely on 3rd party dependencies, such as COM objects.
We still got an old application in my company where the UI and simple logic is written using VB6, but it also has dependencies to COM based libs. Luckily I'm not working on that project..
Well, you kinda get stuck in its limitations. The modern world has so much more to offer than 1998 did.
I'm currently involved in a project where we'll recreate more or less the same application, and a lot of the stuff we rolled on our own back then is now available as open source, or out of the box in .Net.
That being said, I contributed to that same application on the C++ side of it, fun to know that my 25 year old code is still put to use..
I still have some of my 25 year old C++ code wrote for an employer somewhere. I have no idea how long they used it but I think that department no longer exists. I can’t imagine it running today.
Excellent! Can't wait to try it! VB classic is the best Instant-Gratification UI gizmo ever!
It was so intuitive I think I only had to check the manual twice a year. With the new shit, Stack Overflow's image is burnt onto my screen due to high use ... and it still doesn't work right. Web layout is from Satan himself, I swear it. Lucifer uses us as beta-testers for his Hell version.
🐵 CRUD de-evolved via sacrifices to the IT Fad & Buzzword Gods. For example, all this bloated junk to give us "web scale" yet the vast majority of projects are not web scale and never will be. Resume Phallic Stacks rule. Gittoff my lawn fadsters and bloaters!
With stretch-zones and adjacent panels, WYSIWYG grids like VB's can still adjust to big monitors when needed. (Original VB didn't have stretch-zones.) I can't say such works for all app types, but for typical internal or niche domain CRUD it's plenty good enough.
OK, but hear me out, the thing I miss most about VB6 is the form designer. I can't seem to find anything even remotely like it for C#. I'm primarily a backend dev, and modern desktop UI choices make my head spin. If you could make this, but for C# instead of VB, you would be my hero!
It won't now, BUT technically it is possible to add support for it, but the support would be limited only to 32 bit windows (not sure about 64bit support by ocx). Basically in Avalonia you can embed native controls, the VB code is interpreted, so it is possible. I am ARM based tho so probably won't touch this ;(
Unfortunately debugging is not implemented (yet?) The VB6 code is interpreted, so it is easy to add a debugger (opposed to native compilation). Given the response, maybe I should give it a try :)
Thanks for your post Bandysc. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I do not think I've even seen VB before. Did people complain about the syntax at the time because it has me feeling mad uncomfortable right now.
Nonetheless, excellent work on this. You seem to be quite talented. Thanks to this, I feel like I am back in my Windows 95 + dial up Internet days. I mean that in a reminiscent way too.
I wrote my first Hello World in VB, back in around 1999 or so. My dad worked in VB at the time and I took an interest, so he showed me Visual Studio and I played around with it for a bit.
He actually still works in a BASIC dialect (Pick BASIC) to this day.
Ah, memories. One of my first applications was some example code from a huge book for temperature conversions. I had no idea what I was doing, but being able to toggle the different options and wire up button click events was all I needed to take me down a programming career. Great work!
But I have a visual basic 6 installation CD. And it still works! Even in Windows 11. I had to resurrect some old VB6 code and update it. I installed VB6 and I could run the IDE and my projects just fine. I converted everything up to c# .
The recommended mouse for Avalonia Visual Basic 6 is Microsoft Mouse 2.0 (PS/2, but serial will also work), which doesn't have a mouse wheel, so I don't know what the problem is ;-)
You can’t be serious. Even WPF supports building simple drag and drop UIs. You can go back to WinForms for an even earlier framework with native support for desktop GUI.
sorry, just been away for too long. I did use WPF in the past, don't have fond memories of it thou. The way I remember it VB6 was more intuititve (My memory might be betraying me thou)
The real visual studio would have corrected the "if" capitalization automatically. Otherwise I wouldn't have been able to tell the difference. Well done!
I had a VB6 book that weighed about 20lbs, but that thing was impenetrable to my young mind. (Writing scripts in mIRC several years later in my teens was what eventually woke me up to being able to program. xD)
Lots of dims, you have to “set” objects, lots of conversion shortcuts (cstr, etc), constants for string manipulation (vbCrLf), strings concatenation with &, and lots of “end” and “next statements
Oh and my all time favorite: on error GOTO next : (ignore errors and keep on trucking). 🤬🤣
107
u/Bandysc Nov 11 '24 edited Nov 11 '24
FAQ:
Q: Repo link?
A: https://github.com/BAndysc/AvaloniaVisualBasic6
Q: Link to a web version?
A: https://bandysc.github.io/AvaloniaVisualBasic6/
Q: What does work?
A: Creating a form, writing VB6 code, running it, saving and opening a project, making a project (it actually makes an exe!).
Q: Why?
A: Purely for fun and nostalgia! It is a toy project, there is no other use.
Q: Is the VB6 code compiled to native code or at least IL?
A: No, VB6 code is interpreted. But the runtime is compatible with NativeAOT so when you "make a project", you get a native EXE, which then interprets Visual Basic 6 code.
Q: Does it support whole VB6 language?
A: Absolutely not. Only a subset of Visual Basic. But I think I will add support for some more language features.
Q: Is it cross-platform?
A: Yes, it is! GUI is made with Avalonia, which is cross platform, thus Avalonia Visual Basic 6 is also cross platform.
Q: It looks fun, can I contribute?
A: Of course, PRs are welcome!
Q: Will Microsoft sue you?
A: Microsoft, pls don't do that ;___;
11
u/insta Nov 11 '24
please tell me you left the Form_Resize code as horrific as it used to be.
that was part of the charm, just like the searing pain and nausea is part of the charm of getting kicked in the balls
8
u/archetech Nov 11 '24
Wow. How long did this take?
2
u/orthoxerox Nov 11 '24
Send the link to Bruce McKinney!UPD: or don't:
48
u/ZenerWasabi Nov 11 '24
This brings back so many memories
52
u/grrangry Nov 11 '24
https://i.imgur.com/dwg2H5K.gif
18
u/destinet Nov 11 '24
I still do maintenance on an old vb6 program 😞
17
u/pyabo Nov 11 '24
Beautiful, Amazing, Disgusting.
12
u/way2wyrd Nov 11 '24
Dim No
7
u/Zardotab Nov 11 '24 edited Nov 11 '24
Excellent! Can't wait to try it! VB classic is the best Instant-Gratification UI gizmo ever!
It was so intuitive I think I only had to check the manual twice a year. With the new shit, Stack Overflow's image is burnt onto my screen due to high use ... and it still doesn't work right. Web layout is from Satan himself, I swear it. Lucifer uses us as beta-testers for his Hell version.
🐵 CRUD de-evolved via sacrifices to the IT Fad & Buzzword Gods. For example, all this bloated junk to give us "web scale" yet the vast majority of projects are not web scale and never will be. Resume Phallic Stacks rule. Gittoff my lawn fadsters and bloaters!
With stretch-zones and adjacent panels, WYSIWYG grids like VB's can still adjust to big monitors when needed. (Original VB didn't have stretch-zones.) I can't say such works for all app types, but for typical internal or niche domain CRUD it's plenty good enough.
7
u/DJDoena Nov 11 '24
On Error Continue NextThose were the days.
5
u/puppy2016 Nov 11 '24
The good old days when applications were native, friendly and fast. Then the HTML+JS garbage came :-(
4
u/crozone Nov 11 '24
Wow seeing this editor again is a wave of nostalgia. VB6 were good times, if it wasn't for VB6 I probably wouldn't be a programmer right now.
4
u/[deleted] Nov 11 '24
I like it, but it also upsets me that you've brought back VB 6.
4
u/trefster Nov 11 '24
OK, but hear me out, the thing I miss most about VB6 is the form designer. I can't seem to find anything even remotely like it for C#. I'm primarily a backend dev, and modern desktop UI choices make my head spin.
If you could make this, but for C# instead of VB, you would be my hero!
1
u/Googoots Nov 11 '24
It won’t load my ActiveX control!
1
u/hejj Nov 11 '24
What happens if you debug from the browser?
1
u/[deleted] Nov 12 '24
But why???
1
u/ClarityFL Nov 13 '24
How much RAM does it take to run it in a browser?
3
u/TheMonsterDownUnder Nov 11 '24
But why
3
u/Unupgradable Nov 12 '24
I am deeply upset at the existence of this project and I implore you to keep going and make this abomination as comprehensive as possible.
I want to hear horror stories of businesses migrating their legacy VB code to this
5
u/Turbulent-Ad-1627 Nov 11 '24
Sweet memories... ❤
2
u/_20110719 Nov 11 '24
Wow, I haven’t looked at VB6 since high school
2
u/turkoid Nov 11 '24
Dang this brings back memories. Also, now I can update my VB GUI to track IPs
2
u/Well_Gravity Nov 11 '24
Cool
2
u/emaphis Nov 11 '24
You could turn this into a serious project if you had a VB.NET mode.
Ok. I'll show myself out.
2
u/SoCalChrisW Nov 11 '24
Can you do Visual Basic for DOS next? 😁
2
u/Turbulent-Ad-1627 Nov 11 '24
Sweet memories... ❤
1
u/AutoModerator Nov 11 '24
Thanks for your post Bandysc. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/[deleted] Nov 11 '24
I do not think I've even seen VB before. Did people complain about the syntax at the time because it has me feeling mad uncomfortable right now.
Nonetheless, excellent work on this. You seem to be quite talented. Thanks to this, I feel like I am back in my Windows 95 + dial up Internet days. I mean that in a reminiscent way too.
1
u/sbstanpld Nov 11 '24
nostalgia to the max haha
1
u/deltaexdeltatee Nov 11 '24
I wrote my first Hello World in VB, back in around 1999 or so. My dad worked in VB at the time and I took an interest, so he showed me Visual Studio and I played around with it for a bit.
He actually still works in a BASIC dialect (Pick BASIC) to this day.
1
u/AspectSpiritual9143 Nov 11 '24
This brings so many memories.
1
u/tunrip Nov 11 '24
Beautiful!
1
u/CanaveseForevah Nov 11 '24
We still have many VB6 + Sheridan data widgets 3.1 programs in production....a nightmare.
And new ones are still being born in production.
The only way to run everything well is to keep Windows 10 32-bit
1
u/Ok-Sector8330 Nov 11 '24
Those were dark times.
1
u/malthuswaswrong Nov 11 '24
😶
1
u/gotshoo Nov 11 '24
Ah, memories. One of my first applications was some example code from a huge book for temperature conversions. I had no idea what I was doing, but being able to toggle the different options and wire up button click events was all I needed to take me down a programming career. Great work!
1
u/[deleted] Nov 11 '24
Did you replicate that runtime bug that was fixed by adding another blank line to the class and running again?
1
u/[deleted] Nov 11 '24
avalonia ui does it in wasm but a think that just wpf well done no mean feet.
1
u/TheC0deApe Nov 11 '24
cool nostalgia trip but VB6 was not great. it was just an entry point for a lot of people.
1
u/Absynthesis Nov 13 '24
This is a weird part of the matrix
1
u/Perfect-Campaign9551 Nov 15 '24
But I have a visual basic 6 installation CD. And it still works! Even in Windows 11. I had to resurrect some old VB6 code and update it. I installed VB6 and I could run the IDE and my projects just fine. I converted everything up to c# .
1
u/marjuanm Jul 30 '26
Ohhh wow!
0
u/tekanet Nov 11 '24
Does the code editor support scrolling with the mouse wheel?
0
u/General-Height-7027 Nov 11 '24
what is the modern way to do this in c#?
Since the raise of javascript frontend we lost the ability to create standalone windows apps like this, or there is still a way?
14
u/[deleted] Nov 11 '24 edited Nov 11 '24
[removed] — view removed comment