VB6 GUI transition to Xojo

My product has a GUI built in VB6. It’s a dinosaur but it was great for GUI. I am looking for our next great GUI builder. I need multiple platform and both desktop and web support.

There are several developers. Besides VB6 we use Qt and the slew of Javascript tools (React, Electron). We are also looking at C++ Builder.

A lot of our underlying code is in C/C++ and will stay that way.
While the app is currently Windows-only I would like it to run on Linux and maybe Apple and Android.

I would like to consolidate my GUI work as much as possible.

In looking at Xojo as an alternative I have some concerns.

The IDE.
In VB6, we absolutely love the just-in-time debugger that is found virtually no where else. I know I will have to get used to that.
In Xojo it appears as though we can’t look at all of the functions, subs, and properties in a single view. Is that true? If so, I have to assume the IDE compensates for that in some way. I’d like to know how others have made this adjustment from almost any other environment.

I like the GUI builder. Aside from the properties provided in the Inspector view, can individual controls, such as a button, be further customized by code? Not that I want to do this, but sometimes it is necessary (This is what I don’t like about Javascript as it has no GUI builder). For instance, maybe you want to change the colors on a button. Is that possible? In my quick look, I see font, bold, italic, and underline but not colors. There are many other examples.

In VB6 code is stored in various files (.frm, .frx, .cls, .bas) so multiple users can relatively easily work together without too much conflict and use a choice of source control methods. How is this done in Xojo?

Does Xojo support an off-line, desktop worldview like Google Earth? I know it has a control for a web app but it doesn’t appear for a desktop.

I like the looks and (familiar) feel of Xojo.

I realize that a trial is the best way to answer most of these concerns but I also value the input of other users and I’m curious what you might have to say.
Thanks.

Xojo supports building custom plugins if you have C/C++ skills. That way you can put your proprietary logic into a *.dll or *.dylib library to go with your app.

That’s right. The Xojo IDE does not work like other IDE’s, e.g., Visual Studio, where you can scroll through a huge long code file and see all your functions, properties, etc.

Instead you use the project tree-view on the left side of the IDE. It is more clicking to see the entire functionality of a Class or Window, but it’s all there and the search features work well, including when refactoring.

Specific objects like a Class or Window view can be opened into separate IDE tabs, to make things easier to find too.

There is also a “Go To” feature that help you jump to places in your project by object name and of course by line number.

As well, you can open your project in more than one IDE window at a time, so you can work and look at code and forms side-by-side (see File > New Workspace).

I spent over 20 years in Visual Studio and transitioning to the Xojo way of working with code has been a pleasure in the long run. I don’t miss VS (I’m retired now and play exclusively in Xojo now).

You can do this in Xojo as well, but it does require a license above the “Lite” version and then saving your project into the Xojo “text” (source-code friendly) format. Then objects like Modules, Classes, Windows views (forms), custom controls, etc. are all saved as separate text-based files with special file extensions. Then use your preferred source-control tools to manage the rest.

Note: it’s not recommended to try editing these text-based files with anything other than the Xojo IDE.

Also note: The free trial version of Xojo only saves a project to a single binary file.

Here’s an example of what a Xojo project saved in text format would look like: https://github.com/ktekinay/AdventRX

The included controls that come with Xojo are highly customizable with the use of Declares (within the bounds of the given OS) or by using some 3rd party plugins, e.g., MBS and Einhugur.

You can also sub-class an existing control to add special functionality or behaviour. In addition, you can use a Canvas control to draw your own custom controls from scratch. With a little imagination, you can create some pretty incredible visual features with a Canvas.

I don’t use Xojo Web, so someone else may need to help you with questions about that. But I hope this helps with getting you more familiar with Xojo.

2 Likes

You shrug your shoulders, say It is what it is, and get used to it. I haven’t found any instance where Xojo’s IDE has really got in my way. It’s different, but it isn’t worse. The search function and the ability to jump to specific methods in a contectual menu / right click mitigates a lot of the angst of not seeing everything at once. I find it actually helps me focus on a single piece of the code at a time.

1 Like

I always hate dealing with multiple files to get a single project and compile it.

Even more, I hate seeing all the code as a giant sausage. It didn’t allow me to see everything as objects.

XOJO allows me to program in objects, respecting encapsulation. So you can modify a specific method in a class without worrying about the rest. Just looking at the code you’re interested in.

2 Likes

Android is way too limited and it is still in beta and most likely will be like thtat for some years. Also you need a completelly separated proyect/GUI/logic to make and android app.

You can have a single proyect for all the desktop targets, but there a lot of limitations. Yes, it will be consolidated but will include a lot of conditional compiling for each target and also a lot of testing to be sure that the controls are the correct size.

Debuging in xojo is a lot slower than in most tools but is doable.

It is weird the first days but having each sub in a dedicated tree is actually easier… properties not really and things like enums are a nighmare to edit.

Yes but its limitations. You can subclass the control and add new properties (that can be edited in the inspector) new subs, functions, etc. But for colors and special behaviors, you have to subclass the canvas control and draw your own controls. It is a shame that custom controls had a lot of shortcommings, like this one for example https://tracker.xojo.com/xojoinc/xojo/-/issues/57970

Me and many other VB6 users came here because of that. It is a shame that Xojo did a lot of renaming latelly, deprecating many VB6 keywords like Msgbox and Dim.

Web is improving but it is not feature complete yet. You can’t have a consolidated GUI/Proyect with desktop.

I will be giving a talk at the MBS conference in Germany regarding the use of ‘Method Pairs’ to write a single code base for Desktop (macOS, Windows, Linux and Rpi), Web (macOS, Windows, Linux and Rpi) and Mobile (currently iOS, but later Android).

In a nutshell, you create the three identical IDE interfaces (one for Desktop, Web and Mobile) containing no code or events. Instead, the code or events are placed in an external Class that controls everything that happens in your app.

This code is not only shared amongst the three environments, but shared amongst multiple apps too (eg one Login/Settings/Main window/class, etc for all apps).

Maybe this will help you?

a app for all platforms could be a web app. client/server?
a good option could be ms vs 2022 (asp .net) or b4x.
underlying code in C/C++ could be a issue for xojo integration for you.
seeing not all source code from a class with all methods is somehow painful in xojo.

I’m really really glad the Xojo IDE doesn’t do that. It would be a real mess. I used to write my code (PHP and javscript) using BBEdit, which is OK, but it’s a lot easier in an IDE designed for the purpose.

Subclass the control and add any methods and properties to it that you need. Then you instantiate the subclass in your code.

In some instances I’ve made my own buttons and given them my own colours.

No idea since I only work alone.

You’ll have to explain what this means.

1 Like