Live data from Hacker News

Visual Basic 6 IDE recreated in C#

github.com

171–180 of 184 posts

Re: Visual Basic 6 IDE recreated in C#

#171

When you dig into the code you can see that the author did the bare minimum to have a nice demo. For example only 2 functions are supported: MsgBox and InputBox: https://github.com/BAndysc/AvaloniaVisualBasic6/blob/383a005... Still it is impressive to create something complex like this in a matter of 4 days (looking at the commit history). And it is a good start to develop a full fledged IDE. The more advanced featur…

Syntax Highlighting actually is there, it was added after the gif was recorded (you can see that on the web version), autocomplete, hmm, maybe later? :) VB6 language is limited as well, it was more a toy/proof of concept, but given the positive feedback I am tempted to implement more functionality. Especially since the save format is compatible with VB6. It is still gonna be a toy, but actually working toy?

One idea I had for a VB6 clone is prototyping of GUI's for deployment in any language. Obviously, just for simple, utility-style apps or web pages. The concept is to throw together a GUI, use VB6 to make it look right, save the form to a file, and convert that file into another GUI library.

Since I've been learning Python, I decided to try to prototype this idea with a naive VB6 to HTML conversion. The way its done maintains the properties of the controls so any backend could be used. The HTML is semi-useful templates at the moment.

Here's a temporary link showing each step:

https://pastebin.com/E5eqKp23

If it doesn't already exist, you could make this easier with an Export as XML (or JSON) option that supports easy parsing by any language with a XML/JSON library. They can use a list or tree depending on how they want to compose things.

From there, people wanting to build on it would have to add controls to your project (or placeholders for them) that match their own libraries.

Re: Visual Basic 6 IDE recreated in C#

#172
post #81

Oh my GOD I have to comment. This is how I learned to program as a kid. I found a copy of "Write Your Own Adventure Programs" (1983 - Usborne: https://colorcomputerarchive.com/repo/Documents/Books/Write%... ) as a kid in my primary school's bookshelf. I remember the code was written in BASIC and my family didn't really own a computer back then. Fast forward a few years later I saw this "Visual Basic" thing and though…

We have similar experience with VB6, though I was the opposite. Instead of reading a book about BASIC, I was reading a book about VB.NET. My first interaction with Visual Basic was through VBA in MS Word. The first time I opened it, I know that it was a place to code, but I don't know what kind of code I have to type. I don't know any programming language at that time. And then sometimes later, I found a VB.NET book…

How to tell if somebody never got to use Delphi:

> And till today, I still think that VB 6 GUI Builder is the best I have ever tried.

;-)

Re: Visual Basic 6 IDE recreated in C#

#173

Oh my GOD I have to comment. This is how I learned to program as a kid. I found a copy of "Write Your Own Adventure Programs" (1983 - Usborne: https://colorcomputerarchive.com/repo/Documents/Books/Write%... ) as a kid in my primary school's bookshelf. I remember the code was written in BASIC and my family didn't really own a computer back then. Fast forward a few years later I saw this "Visual Basic" thing and though…

This! I want my kids to do the same but are really unclear as to how this is done today without BASIC. I am not psyched about tools that help you merely build platformers with WYSIWYG. Any ideas?

> Any ideas?

https://www.lazarus-ide.org/

Re: Visual Basic 6 IDE recreated in C#

#174

It's an awesomely inspirational vision, but within 2 minutes of trying it out I found it's lacking a lot of little features (at least on the web build)... e.g: Ampersands in button labels don't create an accelerator (e.g. &Go does not underline the G). In true VB6 you could plop down a Label control and just start typing to change it's contents. Here you have to focus on the input field first (and you can't just clic…

> A working Build button that spits out an "exectuable" that runs in the browser would be killer!

Check out Jon Aasenden's Quartex Pascal: https://quartexdeveloper.com/

Re: Visual Basic 6 IDE recreated in C#

#175

Earlier quoted context omitted.

Dark mode would have been trivial with old toolkits because they used standardize look and feel. In fact motif lets you customize the color scheme through a text file. Which can make each app fit the appearance of the given desktop. Old guis also had more accssibility features. The only thing modern ones have going for them is animation and visual customization.

Old toolkits make it much easier to set the text color of some label to #444, which looks fine on a light background, but is very hard to read on a black background. Setting it to some well-defined MutedText color requires more effort, and it requires the toolkit vendor to have thought about named colors in the first place (and if there are named colors, they might not be meaningful like Muted or Success, but instead…

> Old toolkits make it much easier to set the text color of some label to #444, which looks fine on a light background, but is very hard to read on a black background.

That's why in for example Windows, up until ~early/mid W7, you could set both TextCoulour and BackgroundColour to whatever contrast you wanted, and then all apps respected that.

Re: Visual Basic 6 IDE recreated in C#

#176

Earlier quoted context omitted.

You can change background and button colors too. Other point is noted. But let’s compare the alternative: 1. Fiddle with a config file for each app for a week. Distro includes this in dark mode set. 2. Each app writes custom code to listen for and adapt to dark mode events.

Let me restate the problem: I set my system-wide window background to black and text color to white. An app developer sets a label to dark gray text and default/transparent background. The end result is that I cannot read the label. Or the developer uses black icons on the toolbar — and I cannot use the toolbar, because I can’t see anything. macOS introduced system-wide dark mode a few years ago, but app developers h…

> Let me restate the problem: I set my system-wide window background to black and text color to white. An app developer sets a label to dark gray text and default/transparent background.

Yeah, that's a moronic developer. So what? Moronic developers have always existed, and still do. You can't blame toolkits or OSes for their existence.

> Classic Win32 apps need to implement their own dark mode with custom themes/controls (like Explorer does).

Only since Windows was enshittified from ~Windows 8. (Though the first signs came in late W7.) Before that, you set whatever systemwide theme you wanted -- Light, Dark, Hilarious Clowncar -- in the Control Panel, and all apps followed that.

Well, almost all... Some, then many, fuckwit companies refused to follow the user's system-wide settings, and of course now nobody does because there are none. (Ironically, among the first offenders, and certainly the most influential, was Microsoft itself.)

But old Windows was far better at these things than current, and AFAICT at least as good as, possibly better than, any current Linux DE.

Re: Visual Basic 6 IDE recreated in C#

#177

Earlier quoted context omitted.

Let me restate the problem: I set my system-wide window background to black and text color to white. An app developer sets a label to dark gray text and default/transparent background. The end result is that I cannot read the label. Or the developer uses black icons on the toolbar — and I cannot use the toolbar, because I can’t see anything. macOS introduced system-wide dark mode a few years ago, but app developers h…

Black-on-black is a big problem. You can't make an app use a dark mode unless it's painstakingly crafted to support it. Only trivial apps would work by changing some system-wide palette. Also, if there is any artwork (button icons etc) then that has to be done in two or more sets, for varying backgrounds. Few icons would work well on both a light and dark background.

> Black-on-black is a big problem. You can't make an app use a dark mode unless it's painstakingly crafted to support it.

Maybe not now, but back in the day, that was utter BS. You pretty mucch had to go out of your way not to have your app use whatever colour palette the user had decided on. Well, on Windows, at least. (And here I thought people used to brag about programming tools on Linux being better than on Windows; are you saying that in at least this respect, they werern't better even then?)

> Only trivial apps would work by changing some system-wide palette.

That must be why almost ALL Windows apps up until at least ~2010 worked just fine by changing the system-wide palette.

> Also, if there is any artwork (button icons etc) then that has to be done in two or more sets, for varying backgrounds. Few icons would work well on both a light and dark background.

Oh, it worked well enough. (Mostly, I suppose, by the super-advanced trick of using colours pretty much midway between light and dark.)

Re: Visual Basic 6 IDE recreated in C#

#178

Earlier quoted context omitted.

It used to have darkmode++ back in the day, because windows allowed you to just choose all the controls colors in any way you wanted. Of course it lacks features we want today, especially things we are used to from the web, like highlighting fields with errors in them etc., but I often think new features can't entirely explain why the newer toolkits are so much less ergonomically useable.

Changing control colors tends to break, since developers may set the text color to "really dark grey" without changing the background, so you get black on black.

For precisely this reason, only idiot developers ever did that.

Re: Visual Basic 6 IDE recreated in C#

#179

Earlier quoted context omitted.

At the same time it's common to hear "how does this not support high DPI?" or "How does this app not have a dark mode, it's 2024!" etc. Modern toolkits just do a lot of stuff that older toolkits didn't. Some times at the expense of not being as quick to get off the ground as VB was. The original winforms implementation in the early 2000's was pretty close to VB in terms of efficiency but its warts were numerous, e.g.…

It used to have darkmode++ back in the day, because windows allowed you to just choose all the controls colors in any way you wanted. Of course it lacks features we want today, especially things we are used to from the web, like highlighting fields with errors in them etc., but I often think new features can't entirely explain why the newer toolkits are so much less ergonomically useable.

> It used to have darkmode++ back in the day, because windows allowed you to just choose all the controls colors in any way you wanted.

It's amazing how almost nobody in discussions like this ever acknowledges that. Are all the GNOME kiddies just so determined never to admit anything else could be better at anything, or do they genuinely not know how much shittier stuff is now than Windows was only a dozen years ago?

> Of course it lacks features we want today, especially things we are used to from the web, like highlighting fields with errors in them etc.,

Yeah, that's unfortunately true. But, since the definition of "What is an error?" is up to the app, it feels kind of excusable that pointing it out in the UI also did. Sure, could have been easily fixed with two more settings -- ErrorTextColour and ErrorBackgroundColour, something like that... But absent those, clear reds and yellows work pretty well (for the non-colourblind). You'd have to intentionally set your UI to be pretty garish for those to be taken for "normal" colours.

> but I often think new features can't entirely explain why the newer toolkits are so much less ergonomically useable.

All I can come up with is "Kids today, sigh".

Re: Visual Basic 6 IDE recreated in C#

#180
post #111

If I'm not mistaken, ComboBox is supposed to have a mode in which it allows typing in it, in addition to choosing items from the dropdown.

Yeah, that's what makes it a "Combo" box: a combo of Editbox and DropdownListbox. If you can only choose items from the dropdown, it's not a ComboBox but a DropdownListbox.
Post reply on HN