Skip to content

The Modern Alternative to Visual Basic

Update for 2021: Modern Visual Basic for your Mac

Xojo is the modern alternative to Microsoft Visual Basic. Xojo is a single language to build apps for Mac, Windows and Linux desktop, plus web, mobile and Raspberry Pi. Cross-compile desktop apps and use the same powerful language to develop for web and mobile too.

Develop Faster with Xojo

Xojo is more powerful than VB6 while at the same time more approachable than VB.NET. With Xojo, a single project can create desktop apps that work on Windows, macOS, Linux and Raspberry Pi. Unlike VB and Visual Studio, Xojo allows you to develop on your platform of choice- Windows, Mac or Linux.

Modernize Legacy Desktop Apps with Web and Mobile

Because Xojo can create apps for so many platforms, it is a great way to modernize and update your legacy desktop apps to web or mobile apps.

With Xojo, web apps are as easy to make as desktop apps. Use Xojo’s powerful language to create your web app instead of HTML, CSS, PHP, JavaScript, and AJAX and save tons of development time. Xojo web apps can be deployed to any server (Linux, macOS or Windows) and can also use the industry standard Apache web server.

These days mobile apps are often a necessity. Design your Xojo iOS apps using drag and drop in the layout editor, add your code and publish. Access the iOS-features you’d expect, like sharing panel and your photo library, and also the iPhone’s hardware-based features, like motion, location and camera. Xojo makes iOS development familiar and fast. Xojo Android is currently in development and will be testing soon.

Similarities between Xojo and Visual Basic

Language

The Xojo programming language is very similar to Visual Basic. It has commands like If..Then..Else, For..Next, and While..Loop. You will also find the object-oriented capabilities of Xojo quite similar to VB.NET.

Data Types

Xojo shares many of the same data types with VB6 and VB.NET, including: Integer, Double, String/Text, Currency, Boolean, Variant.

Controls

Xojo has many common controls including: Buttons, Labels, TextFields, TextAreas, ListBoxes (grids), PopupMenus, ProgressBars, toolbars and more.

Differences between Xojo and Visual Basic

Compiler and Run-time

Xojo apps are compiled to native code. They do not contain byte-code that is run by a virtual machine (as with .NET). The run-time library is included with your applications so there is nothing additional that needs to be installed on users’ computers.

Language and Framework

Xojo is fully object-oriented. Unlike VB6, you can have classes that use inheritance and other object-oriented features. The Xojo framework is designed to be simple to use and support cross-platform applications; it provides access to many things you’ve come to expect such as file handling, databases, graphics and more.

File I/O

One of the biggest differences between VB6 and Xojo is file I/O. Xojo consolidates all its file processing into a few classes: FolderItem, TextInputStream, TextOutputStream and BinaryStream. VB6 uses hard-coded file paths and less flexible file access methods, primarily because it only needs to work with Windows-specific file paths.

Data Types

Xojo is strongly typed, just like VB.NET. VB6 allows you to do some things the old-school, BASIC way, the most significant of which is using variables without declaring them (the type is inferred by a suffix on the name). Xojo does not allow this. Use the OPTION EXPLICIT command in all your Visual Basic code to have VB enforce explicit variable declarations.

Improved Error Handling

Xojo has modern exception handling using Try/Catch, Exception and App.UnhandledException.

Shared Libraries

Xojo cannot create DLLs, ActiveX controls, .NET assemblies or any kind of shared libraries. Since these are all Windows-specific technologies, that is somewhat understandable. You’ll either need to rethink your design or just re-use these components from within Xojo (and limit yourself to deploying only on Windows).

Switching to Xojo

Xojo is free for learning and development. Take your time to see how Xojo can help with your next project. Develop, run and debug your application with the free IDE, only purchase a license when you are ready to compile. Learn more about Xojo, read the User Guide and visit the Xojo Docs.

If you find yourself frustrated with VB.NET or are looking for something to replace VB6, be sure to test out Xojo. It might be just right for you. Watch the Migrating from VB video to see how a simple app is migrated to Xojo and visit our Migrating from Visual Basic page at the Xojo Docs for more details.

Updated June 2020