Dec 172017
 
Another set of tools cor quick basic 4.0.
File BWTOOL02.ZIP from The Programmer’s Corner in
Category BASIC Language
Another set of tools cor quick basic 4.0.
File Name File Size Zip Size Zip Type
BWTOOL02.DOC 17331 5872 deflated
POPLIST.SUB 5936 1713 deflated
TPCREAD.ME 199 165 deflated

Download File BWTOOL02.ZIP Here

Contents of the BWTOOL02.DOC file










WINDOW TOOLS


Programming 'Toolbox' Routines

for the

Microsoft QuickBASIC v.4.0 (tm) Compiler



Public Domain Release #2 from the Window Tools Library

POPLIST.SUB


by

Dave Evers
2500 Larch Rd. #58
Quincy, IL 62301
(217) 224-3615



OVERVIEW

The Window Tool routines are designed to perform tasks that I
have found to be common to many of my programs; and they were
created to perform these tasks in a manner that will enhance the
value of the programs they work with. I have attempted to make
them as universal as possible so that they can be adapted easily
to work in your programs. I have also tried to make them as
aesthetically pleasing as I could so that your programs can look
more like those which you purchase commercially.

All of these routines use as a base the BASWIND4 package which
is included in these libraries, and is also released to the
Public Domain. The routines in BASWIND4 allow for fast screen
writing (which is fundamental to all of these procedures); the
ability to easily create a colored 'window' on the screen; and
to let you save and restore the contents of the screen to and
from an integer array so that you can create 'pop-up' window
features in your program with a minimum of effort.

The Window Tools routines build upon these basic functions to
provide for more 'high-level' applications. A simple call to a
Window Tool procedure with the appropriate parameters will
enable you to perform relatively complex tasks such as choosing
a filename from a directory by simple selecting it from a list.
I have found that these routines save me a great deal of time in
my programming; and I hope they do for you, too!

All of the BASWIND2 and Window Tools routines require the
Microsoft QuickBASIC 4.0 Compiler.

You CANNOT use these routines with the BASIC or BASICA inter-
preter. Attempting to do so will surely cause your computer to
become spastic; possibly to the point of damage to files on
disk. PLEASE DO NOT ATTEMPT TO USE THEM WITH THE INTERPRETER.

There are basically three ways to use the routines included in
this package:

1) In a Quick Library, which is perfect for developing
programs in an interactive fashion with QB V 4.0.

2) In a standalone EXE file created by the compiler
when using the Quick Library. Programs created in
this manner will require the presence of the file
BRUN40.EXE in order to run.

3) In a standalone EXE file created by compiling the
main program with the '/O' option; and then linking
with the WNDTOOL4.LIB library. Programs created in
this manner will be quite large; but they will be
wholly self-sufficient.

LINK filename,,,WNDTOOL4;



CALLING CONVENTIONS


In all of the following descriptions, numeric variables MUST be
integers; either globally defined early in the program by means
of a DEFINT statement, or locally at the statement level by the
integer assignment '%'.

You may also replace the variables in the parameter list with
constants when using QuickBASIC Version 4. Strings must be
quoted (i.e., "This is a String").


POPLIST

Purpose: To display within a window a specified limited number
of items. The total number of items can be scrolled
up or down through the window using the cursor keys.

CALL POPLIST(HEADER$,SHOWITEMS%,MAXITEMS%,ITEM$(),FORE%,BACK%,
HFORE%,HBACK%,QUADRANT$,SHADOW%,SELCT%)

Passed: HEADER$ - A title string to appear in the header
header (top row) of the window. The length
of this string will determine the width of
the list window unless a choice description
in array ITEM$() below is longer.

SHOWITEMS% - The number of items to display in the window.

MAXITEMS% - Total integer number of items in the list array.

ITEM$() - A string array with the individual list
descriptions for each choice.

NOTE: The highlighted 'select bar' should be
of constant length. The length of the
list item should be made equal by adding
spaces to the end of the descriptions.

FORE% - The foreground frame color; ranging
from 0 (BLACK) to 15 (BRIGHT WHITE).

BACK% - The background window color; ranging
from 0 (BLACK) to 7 (WHITE).

HFORE% - The foreground color of the Header.

HBACK% - The background color of the Header.

QUADRANT$ - A string which defines where on the
screen the window will be placed:

--------------------------- "0" - Exact center of screen;
| . | centered according to size.
| 1 . 2 | "1" - Upper left quadrant.
| . | "2" - Upper right quadrant.
|.............0.............| "3" - Lower right quadrant.
| . | "4" - Lower left quadrant.
| . |
| 4 . 3 |"rr:cc"-Specifies exact coordinates
| . | of upper left corner of the
--------------------------- window to be row rr and
column cc (2 digits each).

SHADOW% - A switch to determine if window will have a
black shadow underneath. 1 = yes. 2 = no.

Returns: SELCT% - An integer with the number of the item
selected. The actual list item selected
can be determined by LIST$(SELCT%). If
[ESC] is pressed, SELCT% will be 0.


THE SHAPE OF THINGS TO COME

I mentioned earlier that the QuickBASIC environment is perfect
for the development of "toolbox" routines with which to be able
to build future programs. The BASWIND4 routines in this package
are a beginning to that toolbox effort; and using them, I have
written a number of useful tools that I have found invaluable in
my own programming. This brings me to a rather novel proposition
in the 'Shareware' community.

I was actually quite surprised when I found that quite a few
people around the country liked my original BASWIND program
enough to send me a contribution. It also led me to believe that
my programming also had value to other people. However, I am
just a little concerned by the overwhelmingly commercial atmos-
phere that has developed in the BBS community of late; where
everybody seems to be using the channel as a means of selling
their product rather than a free exchange of ideas. I was very
moved by the book "HACKERS", by Steven Levy which brought forth
the 'Hacker Ethic': That information and knowledge were there to
be shared, not bought and sold.

This puts me in somewhat of a quandry: First, if my programs
actually have value to people, I would like to benefit. However,
I have taken a great deal from the Public Domain world, and I
would like to feel that I have made my own contribution in some
small way by giving something back. Thus, I have come up with
what I figure is an equitable solution.

I have written a collection of 'medium-level' tools using the
'low-level' features of BASWIND4 to perform specific tasks for
'high-level' applications programs. These include:

POPMENU - a 'pop-up' menu in a window that allows
you to send it an array of choices, move
a highlighted 'menu bar' over these
choices using the cursor keys, and returns
your selection when you press [RETURN].

POPLIST - Similar to the pop-up menu above, but allows
you to send it a list of items, even more
than can fit within the window, and lets you
scroll all the way through it to pick out
your selection.

POPDIR - A special case of the POPLIST routine above.
You pass it a file spec (*.*, etc.) and it
returns with the directory in a list that
you can scroll through and select from.

TAGLIST - Another special case of the POPLIST routine.
Instead of scrolling through and picking one
selection from a list, this routine allows
you to 'tag' or 'untag' multiple selections
which are returned to your program in an
array.

TAGDIR - A special case of TAGLIST, which allows you
to tag or untag multiple filenames from the
directory.

BARMENU - A display similar to that of QuickBASIC V.
2's. A bar across the top tells you the basic
choices, and a moving 'pull-down' menu window
allows you to select choices from each of these
headings.

MENU123 - As the name implies, gives you menus similar
to those of LOTUS 123.

CALENDAR - Send it a month and a year, and get back a
calendar in a window.

CALENDR3 - Send it a month and a year, and get back
calendars for that month, the previous, and
the next month all in a window.

KEYCAL - Given a beginning month and year, a calendar
is displayed in a window; however, using the
cursor keys you can advance or back up through
the months and years to display the calendar
for any month of any year.

SAVEWIND
&
RESTWIND - Like SAVESCRN and RESTSCRN, except that they
work only for the area covered under the window
in question; thereby working much faster and
using far less memory.


*** PLUS MANY OTHERS ***


A companion file, BW4DEMO.ARC, includes a complete demo of each
of the tools in the package.

THE FREE PART

In keeping with my desire to share these tools with the rest of
the BBS community, I am hereby committing that I will release
every one of these routines to the Public Domain. You have my
word that each of the routines described above will be donated
to the user community free of any requirements for reimburse-
ment or contributory payments. Approximately once a month, I
will release a new routine until all of them are available free
of charge. If you have patience, you can eventually collect
every one of them; and use them to your hearts content in any
program that you sell, give away, or pay people to use with my
blessing!

You will be responsible for finding them. I have found that the
original BASWIND program propogated quite quickly through the
BBS community; and these routines should do as well. The only
places that I can insure you will find them are the GEnie IBM
Roundtable and the Compuserve IBM Software SIG (this assuming
that the respective Sysops approve of these programs' distri-
bution by this method). I will try to upload them to as many
BBS' as I can, but due to horrendous long distance bills I can't
guarantee this.

These tools will be released as BWTOOLxx.ARC, where xx is a two
digit number. Thus you will be able to tell when a new one
arrives. The releases will only include the individual tools;
you will require this package (BASWIND4) for the fundamental
routines.

NOW THE PART THAT COSTS

To satisfy my other wish to keep food on the table, I make you
an alternative offer. For a contribution of $25, I will send you
a disk with every one of the routines listed above; so you can
begin using them right away. This disk will include the Source
Code to all of the routines so that you can modify them to suit
your own requirements. Payment of this $25 contribution gives
you full rights to the use of these programs in any application
that you write for use for yourself, your company, or to sell in
unlimited fashion. There are no more charges! It's yours to use
as you see fit!

So, the choice is up to you! If you choose to send in the con-
tribution, you will get immediate use of the routines. If you
choose to wait, you will ultimately get all of them for nothing.
I hope this is an acceptable means of accomplishing my desire to
contribute to the BBS community without sacrificing any real
value these programs might have.

Regardless of how you obtain these tools and how you use them,
please continue to support the BBS community by developing
routines and distributing them for other people to use and build
upon. I shudder to think where I would be today without the help
I have received on the various BBS' I inhabit. So if you write a
utility that you find useful, please consider making it avail-
able to the rest of us. The 'Hacker Ethic' remains as valid
today as it ever did. Please do your part to help support it.

Dave Evers
2500 Larch Rd. #58
Quincy, IL 62301
(217) 224-3615

GEnie Address: D.EVERS
Compuserve: 72456,2325
BIX: devers







DISCLAIMER OF LIABILITY



I, David Evers, as author of the BASWIND subroutine contained in
this package, hereby disclaim all responsibility for any con-
sequence arising from the use, misuse, or non-use of any of the
materials included herein. If this scares you and you feel that
you can't in good conscience use this product without deposits
and bonds and insurance policies for millions of dollars, THEN
DON'T USE THIS SOFTWARE. If you are afraid that use of this
product will damage your reputation, turn your green screen mon-
itor amber, change your house AC voltage from 110 to 220, or
make your hair fall out; THEN DON'T USE THIS SOFTWARE. And if by
chance YOU DO USE THIS SOFTWARE, and your spouse leaves you,
your hard disk crashes, and your modem begins playing "Yankee
Doodle", then you know it's YOUR OWN DAMN FAULT!


 December 17, 2017  Add comments

Leave a Reply