home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
vrac
/
bkgrnd.zip
/
DOSBKGND.TXT
< prev
next >
Wrap
Text File
|
1994-08-07
|
4KB
|
73 lines
Requirements
------------
DOSBKGND.PAS and VIDEO.PAS require nothing more than Borland Pascal
version 6.0 or later and Turbo Vision.
The routines in the Video unit are self-explanatory and can be used
seperate of DOSBKGND.PAS.
DOSBKGND.PAS requires VIDEO.PAS. See SAMPLE.PAS for an example of how
to use DOSBKGND.PAS.
Cost and copyright information
------------------------------
Both DOSBKGND.PAS and VIDEO.PAS are freeware and uncopyrighted. Anyone
is free to distribute both units and modify them as they wish. The
only requirements are that they be distributed together, as
DOSBKGND.PAS requires VIDEO.PAS.
Possible problems
-----------------
This was written using Borland Pascal 7.0. I would assume that it
would work correctly with Turbo Pascal 6.0 with two exceptions. On
lines 61 and 65 in VIDEO.PAS, I make reference to two constants
defined in Borland's System unit - SegB000 and SegB800. I am not sure
if these were defined in Turbo Pascal 6.0. If not, simply replace them
with $B000 and $B800 respectively.
In line 79 of VIDEO.PAS, I refer to the CRT variable WindMax. This
variable contains the lower right coordinates of the current text
window. I assumed that the current text window would be the entire
screen. If a window has been defined using CRT's Window routine prior
to calling the routine SaveDOSScreen, not enough memory will be
allocated to hold the entire contents of video memory. You will
probably not notice this until you call UpdateDOSScreen and find only
a portion is restored and the rest is garbage. This can be prevented
by calling SaveDOSScreen first thing in your program, or at least
before you define any text windows on screen.
Reason for DOSBkGnd and Video
-----------------------------
I was writing a short utility that used command-line parameters to
control its options. This utility only displayed about two lines of
information at the DOS prompt and did not clear or modify the DOS
screen other than writing its two lines of information. I decided to
make it easier to set this utility's options by allowing a dialog box
to be popped up while it was running. I wanted to do this without
clearing, hiding, or otherwise changing the DOS screen. In other
words, I wanted this dialog box to pop up over the DOS screen - in TSR
fashion - and leave the DOS screen still visible, and when it was
closed leave the DOS screen unchanged and start up where I left off.
If you are familiar with Turbo Vision, its TDesktop and TBackground
objects don't allow for this. Also, DoneVideo - called when
TurboVision shuts down - clears the screen.
So I decided to make a new TBackground and a new TDesktop that used
the new TBackground. TDOSBackground's only change from TBackground was
that instead of using a repeating character as a background, it uses
the DOS screen itself. This was done by directly accessing video
memory to make a copy of it, then using this copy to draw the screen
with Turbo Visions WriteBuf command. This copy is also used to
restore the DOS screen after Turbo Vision clears the screen when it is
finished.
Comments and complaints
-----------------------
Questions, comments or complaints are welcome and appreciated. I can
be contacted via Compuserve as Tim J. Duncan [72603,3616]. Either E-
mail me directly or post a message in the Borland Pascal forum (GO
BPASCAL) addressed to me. Please be aware that if you post any
messages in the Borland Pascal forum addressed to me, I will only be
able to download these once a week. Due to financial constraints
(Compuserve can get awfully expensive awfully fast), I only log-on to
Compuserve on Sunday afternoons.