Welcome!
This QBASIC &
Windows FAQ
is sponsored by
the makers of
Liberty BASIC.


Contact us

About Shoptalk
Systems

QBasic and Windows FAQ


QBasic is great BASIC for DOS.  It is useful for learning and you can write useful software with it, and it is fun too!

There are many questions about QBasic and whether it works in Windows.  We've dedicated this page to answer people's questions about this.

Q - What is QBasic?
A - QBasic is Microsoft's free BASIC programming language that is included as a part of DOS and most versions of Windows.

Q - What is the difference between QBasic and QuickBasic?
A - QBasic lets you run programs that you write as long as QBasic is loaded.  QuickBasic is similar to QBasic, but it could only be obtained by purchasing a license from Microsoft.  QuickBasic has some more language features and also lets you create a program that can run by itself.  It does this by compiling (another word for translating) your program into machine language.

Q - How can I tell if QBasic is installed on my computer?
A - Open a command prompt window and type QBASIC.  Then press Enter.  If this doesn't show you a "Welcome to MS-DOS QBasic" screen, then QBasic is probably not installed in your computer.

Q - Which versions of Windows come with QBasic?
A - Most copies of Windows (except XP) that came on a CDROM include QBasic, which can usually be found in one of these directories in the Windows CDROM disk:  \OTHER\OLDMSDOS or \TOOLS\OLDMSDOS  If your computer did not come with a Windows CDROM it may not have QBasic.

Q - I cannot seem to find QBasic on my computer or on my Windows CDROM.  Is there some other place I can get a copy?
A - Only Microsoft has the legal right to give you a copy.  Thankfully, if you cannot find a copy on your Windows CDROM, you can download QBasic and other DOS utilities from Microsoft's public FTP site.  Here is a URL to a self extracting file containing QBasic and other DOS utilities.  Copy this address into your browser address box:   ftp://ftp.microsoft.com/softlib/MSLFILES/
Look for the file named OLDDOS.EXE which contains DOS utilities including QBasic.

Q - Can I write a Windows program with QBasic?
A - No.  Even though you can use QBasic on a computer running Windows, QBasic can only be used to write DOS programs.  To create a Windows program, you will need a programming language specially designed for Windows.  Our product Liberty BASIC is an example of such a language.

Q - Which QBasic commands do not work when running Windows?
A - Almost all QBasic programming commands work when running in a Windows environment.  Specifically, the INP() function and OUT command do not work with Windows NT, Windows 2000, and Windows XP.  It is also possible that in some cases the PEEK() function and POKE commands may also not work.

Q - QBasic runs on my Windows desktop in a little window.  How can I make it fill the whole screen?
A - Hold down the Alt key and hit the Enter key to make QBasic fill the whole screen, and to switch back to QBasic in a window, press Alt and Enter again.

Q - Where can a get a compiler for QBasic that makes EXE files?
A - Microsoft used to sell QuickBasic, which is mostly compatible with QBasic, but you will probably need to get your copy used.  Try ebay.  You can also try FirstBasic  or PowerBASIC (both from from PowerBasic, Inc.).  These are real compilers, very similar to QBasic and QuickBasic and starting at just $25 (for FirstBasic downloadable here) up to several hundred dollars for the fancier products.

Q - How can I make an icon in Windows that will run my QBasic program?  I need the program's window to close itself when it finishes running.
A - This example for Windows 98.  Other version of Windows will be similar.

  • Right-click on the Windows desktop and select New->Shortcut.
  • Type into the dialog that appears something like c:\dos\qbasic /run myprog.bas and click on the Next button.
  • Type a name for your program and click on Finish.
  • Find this new shortcut on your desktop and right-click on it.  Select Properties from the menu that appears.
  • Click on the Program tab and make sure the Close on exit checkbox is checked.
  • Look at the Screen tab to make sure that the Full-screen and Window setting is the way you want it.
  • Click on OK to save your shortcut's properties.
  • Note: To make sure that your QBasic program closes down, it should finish by executing a SYSTEM command instead of an END command.