Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

QBasic/QuickBasic Uses and Usages

QBasic/QuickBasic Uses and Usages

QBasic/QuickBasic Uses and Usages

As a long-time but unsophisticated user of QBasic I continue to be surprised by it's lingering popularity.  I wonder though how most people make use of this family of development tools for MSDOS, meaning QB through VBDOS.

Do most people use it under one version of Windows or another?  Are people still running a lot of DOS machines?  Is dual-booting back into DOS still popular?  Is it important to create QB programs that run under Windows, or are native-DOS programs that fail under Windows still accepted?

What sorts of applications are common?

I see:
  • Learning simple programming.
  • Game programs.
  • Simple graphics programs.
  • Simple BBS and terminal serial port programs.
  • Alternate command shells.
  • Device control programs.
But I don't seem to see many:
  • Database or data processing programs.
  • Internet programs: chat, web, mail, misc. servers.
  • Cool utilities.
  • Embedded device, robotics programming.
  • In general the stuff other programmers seem to be writing.
The games seem to be single-player RPGs or shoot-em-ups.  Surely some QB games are Internet-enabled?  Where is that web site running under MSDOS on a web server written in QB/QuickBasic/VBDOS?  Surely somebody's done this?

Most of the QB sites I find are sort of hackish and primitive, and links pages point mostly to dead sites. There must be at least a few out there dealing with tutorial information beyond "how to code a loop" and such.  I've found a few but they seem rather fragmented, dealing with some one aspect of QB programming - usually some graphics tidbit.  Of course without a stream of income supported by QB projects I can see where maintaining a substantial QB site would pale as other projects come along.

This is just a rambling sort of question, I know.  Sort of "What is the state of QB in 2004?"

Any opinions?

RE: QBasic/QuickBasic Uses and Usages

There have been some attempts at internet stuff with qb but
it is severly limited since windows and the internet seem
to use a lot of asciiz strings (that is fixed with chr$(0) at the end) and limitations on baud rates (some of which can be handled by third-party librarys like mdm2.

Personally I sell a Client Writeup program for CPAs. The
MSDOS version is written in QB4.5 the windows version in
PowerBasic for windows. Lots of people still use my dos version and it and the windows version utilize databases but
they are of a simple type with just an index and a data file. Big files are normally not required in my system so
SQL or other database is not required for quick response.

Several years ago, I wrote an installation routine that
emulates win9x in it's look and feel but written in QB4.5
in screen 12 (640x480 x 16).

I still use some other ms-dos programs (not qb im sure),
one of which is Laser-Twin. An excellent program allowing
dot matrix and jet printers alike to print pcl files. I
use the preview a lot to build forms to this day.

I also occasionally use a hex editor written in dos, a graphics program that converts pictures of various types
to raster/vector graphics for several types of printers,
the Dos editor... so, uses of dos-based programs is still
hanging on albeit less and less.

RE: QBasic/QuickBasic Uses and Usages

Buff1, are your customers still running native DOS then, or typically running even your DOS Basic programs under Windows?

RE: QBasic/QuickBasic Uses and Usages

When I was referring to "Internet programs" I was not thinking in terms of QB programs using serial I/O and implementing PPP/SLIP.  What I had more in mind was more generalized TCP/IP programming, using a network card on a LAN.

There are a couple of ways to go about this, using a packet driver underneath an old Trumpet stack, some guy has a "DSock" thing, and then there is Microsoft's own TCP/IP for DOS.  The latter was once part of the NT Server distribution package (on the NT Server CD) and was also made available other ways.  It also has the "official" TCP/IP for Win 3.1 as part of the "LAN Manager" package, and includes a 16-bit Winsock.dll.

This was posted on Microsoft's FTP server and may still be on there.  Cost: free.

The package includes everything you need to make a DOS machine an MS Networking client or peer file/print server.  What it lacks is the DOS_SOCK.LIB that you need to program against the SOCKETS.EXE TSR that can optionally be loaded.  This was part of a Microsoft TCP/IP SDK that is hard to find now, though MSDN subscribers ($$) may  still be able to download it.

I have a DOS machine running the base Microsoft TCP/IP and LAN Manager pieces/parts, and have had no trouble accessing shared drives on even Win XP machines (or vice versa).  Using TCP/IP no less: not IPX, not NetBEUI.  Can't find a Telnet, FTP, or much else for it though.

Seems like a perfect base for QB network programming.  I'm surprised so little (or nothing?) has been done with it.  It ought to be a great thing for embedded-DOS development.

I have a shady copy of the guts of the SDK now to play with.  No docs really.  It has an updated SOCKETS.EXE, a DOS_SOCK.LIB, and related C header files.  Now I need a little time to see if it all fits together.  If it does I'll pursue a legit copy of the SDK but that seems like a long shot from here in 2004.

It has taken me literally years of off and on combing the web to find even what I have in my hands now.

RE: QBasic/QuickBasic Uses and Usages

dilettante, typically they are using windows OS but still
like MS-DOS programs.

RE: QBasic/QuickBasic Uses and Usages

Thanks.  It may not seem like a big deal, but I find it very useful.

I am nearly convinced that nobody but hobbyists and embedded developers make much use of bare MS-DOS anymore.

RE: QBasic/QuickBasic Uses and Usages

I used QB 4.5 years ago to write a program I sold to real estate agents to estimate closing costs and payouts.  I then bought Visual Basic, thinking there would be some sort of conversion utility.  

When I found out there wasn't, I just kept the code, and shelled out to a dos window to do the calculations.  So, my "Windows" app is really just a shell for the Dos app I wrote years ago.

I've got a couple of applications that control motors,  lights, or recieve input signals using an add in board in the computer.  I sometimes write a simple qb program to test the board operation or try some ideas.  Once I know what I'm doing, I switch it over to VB.

I've found that recently, I try to do everything in visual basic first, and only use QB if I can't get it to work in VB.

RE: QBasic/QuickBasic Uses and Usages

GDGarth you might have been wiser to go with one of the
powerbasic complilers for windows. Not only are they less
expensive but much of your qb code would be easily converted
to PB (especially the console compiler).

Added benefits:
The best forum for technical advise and help on the internet.
No runtime dlls required.
Much Much smaller code than VB.

RE: QBasic/QuickBasic Uses and Usages

    I surpose if Aliens land and remove MicroSoft Windows operating systems then all that would be left would be DOS. As DOS users we would have the knowledge to continue on without user libraries and scripting languages making it all easier. But then the knowledge base in human brains would be smaller.So i spose its a great way to get to know your hardware in a difficult way. Are we losing the ability to go back to basics by being seducted by higher level languages that make programming a breeze?.I spose it depends on what your motivation is for programming as mine is pure knowledge. DOs = Do others Sustain , MS = Most sux,lol.My 2 cents worth.

RE: QBasic/QuickBasic Uses and Usages

That's what I like about PowerBasic. Though there are plenty
of VDs out there for powerbasic, it's basically a "hand-on"
compiler. Most of the coding is done by the user (unless using one of the vds).

RE: QBasic/QuickBasic Uses and Usages

The SAD TRUTH is that there is really no practical use for QB anymore...

You can get VB.NET for free now... from microsoft at that...

In 2 ways...

1) Watch 5 videos and rate them here: http://msdn.microsoft.com/vbasic/atthemovies/default.aspx

2) By using the Free SDK with a trird party open source editor... (which I think you [dilettante] actually posted on my VB Thread)

Download the free SDK here:

And the Visual Editor here:

You also have to have the .Net Framework installed:

This is a lot of downloading (not suggested for dial up)
Otherwise go for it!

It works great!


The only thing that I preferred in QB was direct access to the graphics on the screen...
But now I know how to do the same with VB and C++ so I really have no use for it anymore... :-(

(it's kind of depressing)

Have Fun, Be Young... Code BASIC


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.

RE: QBasic/QuickBasic Uses and Usages

CubeE101, is that really a serious reason why people were using QBasic (bundled) or QuickBasic (easy to steal but with little remorse - basically abandonware)?

I guess this surprises me a little.

I'll ignore any moral issues, that's another subject altogether.  The reason I'm surprised is that some other widespread and pretty decent alternatives have been available for years.

I'll start with VBScript.  Late-bound, weakly-typed, and interpreted as it is, it still meets the requirements of numerous applications.  Full access to "Access" databases and even MSDE databases too, with little trouble.

Mix in Internet Explorer and you have "HTML Applications" (a.k.a. HTAs) which really ought to have been called "DHTML Applications."  Now you have a GUI and an event-handler model that looks a heck of a lot like VB's.

If you're willing to settle for a "clunk-o-rama" model of event-handler coding you always have JScript as an option in HTAs as well.

Not quite what you need?  Well there's VB5CCE (Control Creation Edition).  If you can't get it done via DHTML, just write a VB5 ActiveX component and call that from inside your HTA.

Free or not, VB.Net is a smelly beast in many ways.  It departs radically from MS Basics of the past, much more wildly than VB did from the QB family.

It will never have great performance by its nature, so it is probably less  of a game development platform than VB6 is - if game programming is your... game.  I guess if you "throw enough horses" at it with a multi-GHz CPU and a ton of RAM you mght get somewhere  with VB.Net though.

But if you want "free" VB.Net why not go the #develop route?  This gets you C# to boot.

RE: QBasic/QuickBasic Uses and Usages

Honestly, for me, Ive discovered how far behind I really am programming wise, so I suck it up and use Qbasic for fast dirty applications....

And its nice not to have the all mighty Windows giving me errors and shutting me down for some silly, not all that major problem.

Another issue that developed last summer was very cheap and simple OLD PC's could live again in my control circuits and sit there forever working away....

Randy McKenzie

RE: QBasic/QuickBasic Uses and Usages

Don't get me wrong, QB was really my breaking point into programming... I had Started with GWBasic several years earlier and made several cool little programs (at least I thought so at the time ) and I will never forget the day my friend's dad gave me a copy of qbasic (the interpreter) with Nibbles and Gorilla... That blew me away that you could make those kind of games in Basic and WITHOUT LINE NUMBERS!!! (That took a little getting used to after years of typing line numbers)

I used QB for years and years after that, breaking away now and then to learn a few other languages, but my prference was still QB, especially when I got QB45.

My personal reason for using QB was for Ease of use, Quick Coding, and Making little graphic demos.

It took me about 5 years to get into VB, because I was resistant and still prefered QB...

Then I started using VB with API calls to other programs and windows itself, and you can tweak just about anything you want to with it... (in seconds at that)

Objects and API calls is what finally won me over... If QB could do those 2 things, it would still be my FAV.
I would probably even sacrifice the 32bit code of VB to use 16bit QB, if that was the case...

.Net is pushing the edge a little with all the C++ stuff added into it, but most of them are things I have wished that you could do in QB/VB for years, Like X+=5 or X++

And I know the whole .Net issue with the JIT compiler has to slow things down to a point... But in the end it worked for Java, as far as games and graphics go, I have seen some pretty cool java apps @ www.cfxweb.net under the JACC (Java Applet Coding Competition)

And I'm sure most of you have seen the Things you can do (but aren't supposed to be able to) in QB

There are always going to be ways to hack around and get the results you want (or at least close to what you want) with computers...

After all, no matter what language you use, in the end it all boils down to 1's and 0's and how you arrange them is up to you.

And when I said there is no 'Practical Use' I meant just that...
I did not say there is no use at all...
I even like to go back and optimize code every now and then to squeeze out every last bit of 16bit preformace I can get from QB (and it's, sad but true, sloppy compiler)

What I meant by 'Practical Use' refers back to the original post:

Quote (dilettante):

I see:
Learning simple programming.
Game programs.
Simple graphics programs.
Simple BBS and terminal serial port programs.
Alternate command shells.
Device control programs.

But I don't seem to see many:
Database or data processing programs.
Internet programs: chat, web, mail, misc. servers.
Cool utilities.
Embedded device, robotics programming.
In general the stuff other programmers seem to be writing.

As far as Games, Graphics, Serial Port and the rest of the top paragraph goes, I consider those application, in QB, to be more or less, Amature / Hobbyist programs.

Anyone that wants to professionaly make games and online tools, for money, is going to have to step up and learn a modern language, simply because of the demand.

When you mentioned Databases, embedded apps, and the other in the second paragraph, I see those as more 'Practical' Applications.
Which also require a more powerful languages to reach the demands of users.
After all, why would you want to use a 16bit language to handle ANY of those applications?

You would, most likely, want to use an optimizing C++ compiler, for most of them, such as VC++.

VB is good at connecting to DataBases, but you need more horses under the hood to actually run the DataBase. And VB has to use Objects and/or API calls to connect to the DBs...

You can push the limits of QB all you want, and you can get pretty far, but when compared to a modern 32/64bit compiler... It still won't stand a chance...

Python is another Free (GPL) Language, that blends commands and sytax of Basic and C/C++ together.

You can check it out at www.python.org

If you think any of the above is less than acurate...
I would love to hear why

And most of all, there are always going to be people who prefer Records to CDs, VHS to DVDs, Atari to XBox, Dos 7 to WinXP, and all of the rest of the legacy products to the modern versions, and there is nothing wrong with that. I still like them too. But again there is no 'Practical Use' for them anymore...

This is still just my opinion, I'm not trying to stomp on anyones toes or anything, and I am open to other views on this subject.

Have Fun, Be Young... Code BASIC


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.

RE: QBasic/QuickBasic Uses and Usages

Randy, me too. for quick tests, fixes for data files,and more, QuickBasic is still very useful.

The nice thing is that it runs interpretively or compiled.
So for quick fixes, just run it interpretively, fix the problem, and it's done.

If it requires a windows program, I can always use the
PowerBasic console compiler. With very little change I have
a 32bit windows console program that looks like and works like a dos program.

RE: QBasic/QuickBasic Uses and Usages

No toes to step on here, I'm trying to keep my mind open (hopefuly nothing falls out).

From where we are now, in most cases running 16-bit real mode applications doesn't make sense with typical desktop hardware.  A lot of embedded development is still done in one form of Basic or another, and at the low end we have devices with 80386, 80286, or even '186s and '86/88s as cores within a larger IC.

Where you see C being used is in special applications and those where RAM is at a premium.  Most (though not all) compiled Basics are just a bit bulky for those wristwatch-scale computers.  Yet here you'll find things like 16-bit Basic interpreters or even Forth.

The biggest issue with C/C++ is the speed of development.  For a lot of "practical" programming the time required to get a full-featured, fully functional C program is cost-prohibitive.  For one-offs and small-run projects people usually need more of a RAD tool than C, and a lot of small-scale embedded work is done by guys who are more hardware than programming oriented anyway.

So there are a lot of trade-offs.

Thanks for the feedback everyone.  I didn't have a specific goal in mind and all of the comments have been quite interesting so far.

RE: QBasic/QuickBasic Uses and Usages

I use qbasic to create programs because it is challenging and fun.  I could make great games in Dark Basic that are much better that anything I could come up with in Qbasic, but I don't get the same satisfaction out of doing it.

RE: QBasic/QuickBasic Uses and Usages

That is the same reason I use it.

For the challenge.

Have Fun, Be Young... Code BASIC


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.

RE: QBasic/QuickBasic Uses and Usages

my client writeup uses employee files, chart of accounts,
payee (accounts payable vendor), Customer, depreciation asset files, all indexed. Since most do not get extremely large I use a simple index system.

The data files are the same for my MS-DOS (quickbasic 4.5)
and Win (PowerBasic for Win) versions.

RE: QBasic/QuickBasic Uses and Usages

Kind of off topic, but a few good C++ books that are not complicated and easy to get you moving are:

C++ Black Book (Coriolis)
1001 C++ Tips (SAMS)

You can find them at Amazon and Barns&Noble

They are both HUGE and full of information... But don't get intimidated by the size, they start off slow and build you up gradually...

Basically if you buy a small book to learn from you will be wasting your money, because there is to much to learn to cram into a small book, so it doesn't get explained very well.

Have Fun, Be Young... Code BASIC


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.

RE: QBasic/QuickBasic Uses and Usages

I, too, use quickbasic for small projects mainly.  Especially at my current job, where they still have Win 9x machines.

For completely new programs, I use VB.


RE: QBasic/QuickBasic Uses and Usages

Nice thing about powerbasic for windows. Small compiled exes or dlls and no runtime modules.

RE: QBasic/QuickBasic Uses and Usages

Well, VBDOS does give you the option to create your own subset libraries and of course link them in as desired for a single EXE.

Early Delphi releases are similar.  Delphi 2 is still pretty usable here, and you can always fall back to Delphi 1 or the Turbo Pascal products for DOS.  Many of the DOS compilers (Turbo C, Turbo C++, Turbo Pascal) are available for free from Borland.


I managed to acquire Delphi 2 (CD only, includes Delphi 1) for 99 cents from one reseller awhle back.

RE: QBasic/QuickBasic Uses and Usages

Hi, this article might interest you, it's about different Basic Clones, perhaps you know them already and prefer to stick to QBasic, but it seems like you might find good information about database application servers and such. (REALbasic being the one you might find more useful).


RE: QBasic/QuickBasic Uses and Usages

I am trying to a to get my Hp Officejet to print out
in Qbasic ASCII code,by using HP PCL codes have not been
able to do so,How do you key in command line within QBasic
could you provide me with a small sample of the coding.
this is the way I have been doing it.
LPRINT chr$(27)+027,040,115,051,084,(116)
LPRINT How Deep is my valley in Shadow Printing.
any help would be appreciated.

RE: QBasic/QuickBasic Uses and Usages

Qbasic and QuickBasic will print on LPT1,LPT2 or LPT3 if
opened that way (LPRINT defaults to LPT1).

If your printer is a windows-only printer (bad choice),
You will need to print through a windows program of some sort.

DOSPRINT may help in this respect. search for it or go to my site for a link to Lance's site DOSPRINT/DLLPRINT.

You can try using the shell command to invoke another program to print it.

You could also, write an html file within Qbasic, then call  I.E. with the name of the html file then have the user
print it from there.

Also, if it is not a windows only printer, check your settings for the printer. If you have the ability to either
bypass the driver or capture dos then try one of those.

RE: QBasic/QuickBasic Uses and Usages

Quote (Buff1):

or go to my site for a link

...Which would be where?

Have Fun, Be Young... Code BASIC


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.

RE: QBasic/QuickBasic Uses and Usages

Well, I've read all this and took it in well. I just wanted to add something to that last part about printing from qbasic. The LPrint isn't the only way to send data to the printer. There is also the nice COM on off stop. Just by playing around with these on off stop I realizing that this can send data to my printer when it started spitting out a page.

I'm talking about an HP inject one, not one of those old dot matrix printers. I don't know alot of programming, however I am trying to learn and maybe when I advance to others, I doubt I'll dump older ones. I've found that even ASM is still used for many mathmatical aspects for games and such; debug is a helpful too. I even learn to write a small program that turns on mouse just like the one used in qbasic with it's asm interface; exported .com etc.

All I'm saying is, just because something is old, doesn't mean it is dead; there is always a use for it. Heck even NT still has some rude interface to a DOS cmd and supports debug which is very old and limited. So old is still cool and good in my book. Programs like old dos basic is here and will remain as long as there is an intrest in it even for educational reasons. As for writing games in qbasic... You can write 3d games in qbasic. It isn't outstanding like Quake etc which you could pull off with Darkbasic Pro or C/C++ and ActiveX programming. However I'm not saying can't be done either. But, you could do a nice old Wolfenstine 3d game. Check out this book called Revolutionary Guide to Qbasic, it shows what I'm mean and backs up what I'm saying as well.

To end this, all I want to say is programming is grate no mater what language one plans to start learning from or decides to end with useing. Last every programming language I've found allows direct poking to Hardware Devices. How else could you trick qbasic to have more than 2 modem com ports for a 4 modem com port setup? PowerBasic is nice too even the dos version which I still own. Anyhow, what everyone has said holds truths and it was well worth reading.

RE: QBasic/QuickBasic Uses and Usages

If you can write a pcl file for your hp deskjet and send it
to the printer, it should print fine.

I now dont have a working jet printer here, and still use
lasertwin to check my pcl to view it without having to
print it out.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close