by wernsey · 4y ago · 0 comments
20 years ago I would've opened up VB6 and knocked out a quick GUI for that kind of work, but I never got on to the VB.NET train.
So I spent some time that evening looking at modern VB6 alternatives, but nothing satisfied me: Lazarus might be something I'd look to in the future, but I'm not too keen on Pascal, Gambas is not really suitable for Windows, then there is this and RADBasic that are incomplete.
In the end, I found a nice Tkinter tutorial [1] and managed to get the GUI I envisioned up in an hour.
I've played with Tkinter many years ago, but I basically had to learn from scratch. The speed at which I was able to get up and running led me to conclude that this is how I'll approach these types of requirements from now on.
The GUI didn't even look as bad as I remember Tkinter looking.
QML also has GUI design tools, but it takes much longer to learn and isn't very good at simple GUIs. However it's better when you need to deploy on Android (iOS requires the paid version).
One thing to keep in mind if the LGPL3 license. If the app isn't distributed, then it's fine, but if distributed, it has to be dynamically linked with some ways of swapping the .so/.dylib/.dll
If you have a visual WYSIWYG designer and, importantly, aren't stubbornly intent on reinventing the wheel, then GUI isn't actually that hard.
If you are familiar with VB6 there is not a lot of difference. Set keyword removed. All collection zero based instead of inconsistent 0 and 1 based. A null and empty string are two different things. Parameters are byval by default instead of byref by default. And you get lots of nice features: generic, linq, return keyword, try/catch, etc. Otherwise the syntax is the same, and winform also works in a very similar way.
I did the transition VB6 => VB.net => C# (the latter when VB got deprecated).