Introduction
Microsoft QBasic was a cut-down version of Microsoft's QuickBasic.
The old versions of QBasic cannot run on newer versions of Windows, trying to click on the executaable file will result in the warning message, "This app cannot run on your PC. To find a version for your PC, check with the software publisher.", and trying to running it from a command prompt results in the message, "Unsupported 16-Bit Application: The program or feature 'qbasic.exe' cannot start or run due to incompatibity with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available."
Clicking on qbasic.exe in Windows 11's File Explorer gives this message
Runing qbasic.exe in a command prompt gives this message
The original QBasic programs cannot be run on modern Windows machines. This because they are 16bit DOS applications and the last version of Windows that could run them natively was Windows 2000, and that was published in February 2000. From Windows XP onwards, the original QBasic programs cannot be run natively.
You can't even install the last version DOS, version 6.22 which was produced in 1994, on newer hardware without some help. The UEFI BIOSs's do not support it, most drivers are unobtainable, and the hardware used now is well in advance of what could be dreamed of 30 or more years ago.
Solutions
Emulators
There are several emulators for DOS around. The most popular are DOSBox and the more compatible DOSBox-X.
You will also need to find a copy of QBasic. The earlier versions consist of just two files, qbasic.exe and qbasic.hlp.
Running QBasic in the emulators is easy.
In-browser Emulator
While writing ths page I came across PCjs Machines. What this does is emulate a selection old operating systems and programs in your browser. I must admit I enjoyed playing a 1985 version of Rogue, but I was interested is seeing what versions of QBasic were available and if it could still run.
I found two working versions on the site. One is a standalone version 1.1 and another is version 1.0 that came with Windows 95.
To access QBasic on Windows 95, click on Start button and then on Run... In the dialog box that opens type qbasic, and the editor will open.
Both versions will work, but I couldn't find a way of copy and pasting between the editor and my computer, which means the programs cannot simply be copied from one to the other or saved to your own computer. This makes this utility interesting, but not really useful.
PCjs Machines QBasic editor
PCjs Machines running a QBasic program
Virtual Machine
Virtual machines are software packages that emulate a whole physical computer machine, often they provide multiple virtual machines on one physical platform. There are many such software pckages around, but what is needed is one that can emulate a 16 or 32bit x86 machine on a Windows 64bit host.
Once running, the virtual machine can have DOS installed along with QBasic and it should run properly.
Old Hardware
To me, one of the most interesting ways of running DOS and QBasic is on an older computer that was capable of running them from new. Once thrown away in their millions, older machines are sometimes still available from yard sales, thrift sstores, swap meets and online stores. You may even know someone who has one put away in a cupboard somewhere.
Modern QBasic
A way of running old QBasic programs is to use a modern interface for them. QB64 is an extended QBasic language compiler. It runs the QBasic programs I wrote over 20 years ago without problems. Files written in QB64 can be saved as .bas files but the only problem I have with it is that it is a compiler, that is it creates an exe file whenever the code is run, and not just a simple interpreter as the original QBasic was.
The QB64 editor
If you prefer to write your programs in Visual Studio Code then there are a number of extensions available to help, but most are simple code highlighters.
Sources & Resources
FreeBasic
GotBasic
GotBasic (GitHub)
QB64 - a modern extended BASIC+OpenGL language that retains QB4.5/QBasic compatibility and compiles native binaries for Windows
QB64 - Courses for mastering QB64
QB64 (GitHub)
QB64 Forum
QB64 Official (GitHub)
QBasic (Wikipedia)
QuickBasic (Wikipedia)
QuickBasic Cafe
QuickBasic Cafe Forum
Visual Studio Code QBasic extensions