This unit will restore the screen to its original state when your
program terminates. All you have to do is add
Uses VidState;
to your code - it does the rest.
It will not restore the screen information if you change the
constant KeepVideoData to False or if there is not enough Heap
space free. Saving a screen requires 2 kb to 12 kb (up to 12 kb in
a Super VGA mode).
The cursor size, cursor position and video mode are always restored.
Graphic modes are never restored as they can require up to 2 Mb
of storage - and very few people use DOS in graphics mode.
If you place VidState after CRT in the Uses clause it WILL NOT
work. It must be first because CRT sometimes clears the screen.
The test program TESTVS goes into graphics mode, places colour on
the screen and then exits. Note how VIDSTATE restores the screen,
even Super VGA text modes! Also note that adding
{$M 8196,0,0}
to the top of the program stops VidState from working.
*
This software is copyright by Michael Gallias. You may use this
software free of charge if you are simply using it for private use
or if you are using it to write freeware, postware or public domain
software.
Please send me a postcard with your name and address and a small
comment so I know that someone out there actually appreciates
my software and hard work.
If you are writing commercial software, working in a business,
writing shareware, or using the software to make a profit, you are
expected to make a reasonable donation to the author.
Any comments or suggestions are always welcomed by the author.
Please feel free to EMail me or write to me at any time.
If the product is source code, you are welcome to use it in any of
your programs. Furthermore, you are welcome to modify the code
anyway you wish for your personal requirements. You may not
however redistribute the modified source code. If you use any
part or all of the source code in your programs, please make
sure you credit me in y
|