Last checked and Links validated:- 29 June 2003
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.
** This insert Win 2000 info came from http://www.jsifaq.com/SUBE/Tip2400/rh2498.htm -AJ **
Where is QBasic in Windows 2000? When you try to run QBasic in Windows 2000, you are greeted with:
'qbasic' is not recognized as an internal or external command, operable program or batch file.
You can find QBasic in the help file, but you can't find it on your disk or on the Windows 2000 CD-ROM.
I guess they forgot to copy it.
For now, mount your Windows NT 4.0 CD-ROM and switch to the folder containing qbasic.ex_. Then type:
expand qbasic.ex_ %systemroot%\system32\qbasic.exe
expand qbasic.hl_ %systemroot%\system32\qbasic.hlp
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
direct link to a self extracting file containing QBasic and other DOS utilities:
ftp://ftp.microsoft.com/softlib/mslfiles/olddos.exe ## 400 Server Error 29 June 03 ##
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 (see www.libertybasic.com/indexFromQBFAQ.html) 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 - 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.
o0o