Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QBasic/QuickBasic Uses and Usages 3

Status
Not open for further replies.
Apr 13, 2001
4,475
US
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:
[ul][li]Learning simple programming.[/li]
[li]Game programs.[/li]
[li]Simple graphics programs.[/li]
[li]Simple BBS and terminal serial port programs.[/li]
[li]Alternate command shells.[/li]
[li]Device control programs.[/li][/ul]

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

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?
 
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.
 
Buff1, are your customers still running native DOS then, or typically running even your DOS Basic programs under Windows?
 
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.
 
dilettante, typically they are using windows OS but still
like MS-DOS programs.
 
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.
 
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.
 
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.
 
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.
Mick
 
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).

 
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:
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)
-Josh

Have Fun, Be Young... Code BASIC
-Josh
cubee101.gif


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
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.
 
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
 
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 @ 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:
dilettante said:
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
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
-Josh
cubee101.gif


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
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.
 
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.
 
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.
 
That is the same reason I use it.

For the challenge.

Have Fun, Be Young... Code BASIC
-Josh
cubee101.gif


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
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.
 
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
-Josh
cubee101.gif


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top