Dec 092017
ANSIView is a unit that will give you CRT's features while still retaining the features of the new TVISION enviroment.
File ANSIVI.ZIP from The Programmer’s Corner in
Category Pascal Source Code
ANSIView is a unit that will give you CRT’s features while still retaining the features of the new TVISION enviroment.
File Name File Size Zip Size Zip Type
ANSITEST.PAS 5644 1492 deflated
ANSIVIEW.DOC 6542 2569 deflated
ANSIVIEW.PAS 22402 5612 deflated

Download File ANSIVI.ZIP Here

Contents of the ANSIVIEW.DOC file


By Marcos R. Della

OVERVIEW - ANSIView is a unit that will give you the features that you came
to enjoy from the CRT unit with the earlier versions of Turbo
Pascal while still retaining the features of the new TVISION enviroment.
ANSIView provides a single object that will give you the ability to open
a "CRT" window on your desktop and interface with it exactly as you would
with a "normal" pascal program.

USAGE - To use this with your program, you will be setting it up exactly
as you would a normal window. That is, you need to initialize it
with certain parameters and insert it into your desktop chain and you
need to dispose of the window when you are done. An example of the
ANSIView window can be seen in the following:

Uses AnsiView;

Var MyWindow : PANSIWindow;

VAR R : TRect;
L : TPoint;
L.X := 80; {Our "screen" size}
L.Y := 25;
MyWindow := NEW(PANSIWindow,Init(R,L,'Demo Window',1));
IF MyWindow <> NIL THEN

NOTE: The L variable in this example defines the actual size of the
screen that you are trying to set up. A normal screen size is 80x25,
however you can set the X value up to MaxViewWidth and the Y value up
to MaxViewHeight. The Minimums are defined by MinWinSize.

The R variable defines the size of the window that will "actually" be
on the screen. It will include scroll bars so that you can scan around
the entire L defined screen. You can also move the window around and
Grow or Shrink the displayable view. The virtual screen will still work
to the size defined in L.

Just like the TWindow object, you can override anything in here that
you really want to however I would not recommend it. User this unit

as a basis of your own applications! Might just be interesting!

FUNCTIONS - There are quite a few functions available to the TANSIView
object. Most of these work exactly as they would in the CRT
enviroment. Those that are different I'll mention.


This procedure works like the WRITELN procedure in pascal. It will write
the string S out at the current cursor location and will screen wrap when
it hits the right "virtual" edge of the screen. It will also scroll when
it hits the bottom of the screen. Note: The displayable scrolling
region will not follow the writeln's unless AUTOSCROLL is set ON.


This is the same as the WRITE procedure. It will do exactly the same as
the PrintLN above however it will not do a Carriage Return/LineFeed at
the end of the string.


A nifty little feature. Since I couldn't make things as nice as the WRITE
routine where it figures out the type being sent to it, you get a
seperate procedure to WRITE single characters.

PROCEDURE PutChar(X, Y : WORD; Ch : CHAR; Attr : BYTE);

For those times that you want to put a specific character to the virtual
screen at a specific position. Note that this will put all 255 characters
on the screen as represented in the IBM Extended ASCII Character Set.
If ch is zero (Null) then no modification is made to the character at
that position. If Attr is zero then no change is made to the textattr
at that position.


Defaults to FALSE. If you set it to TRUE, then the display routines will
process ANSI requests as if there was an ANSI driver in memory for the
virtual screen. Note that the keyboard re-definitions are not part of
this implementation, just the video standards.


This will turn on the cursor at the cursor location when this window is
sfFocused. Note that if the cursor is outside of the relative display
box, then it will not be visible until you manuever the scroll bars
around to the current cursor location.


This turns off the cursor in the virtual window.


Default to TRUE;
If you set AutoScroll to on, then the system will keep scrolling the
relative display box to match the cursor location. This is handy if
you are dumping a file to the little window and want the user to keep
up with what is being output.

PROCEDURE AutoScrollOff;

This turns off the AutoScroll feature.


Same as the CRT Unit. Sets the cursor to the 0,0 location.


Same as the CRT Unit.


Same as the CRT Unit.


Somewhat the same as the CRT Unit. This will let you go ANYWHERE in the
virtual window that you have defined. If you define a window of 80,1024
then you can do a GotoXY(50,1000) and the system will go to that virtual


Same as the CRT Unit.


Same as the CRT Unit.


Same as the CRT Unit.

PROCEDURE TextBackground(Color : BYTE);

Same as the CRT Unit.

PROCEDURE TextColor(Color : BYTE);

Same as the CRT Unit.


Same as the CRT Unit.


Somewhat the same as the CRT Unit. This will return a value from 0 on
through your limit for the virtual screen. It might come back rather


If you have any questions or if you have suggestions (definatly if you have
suggestions!) you can get in contact with me at one of the following...

Marcos R. Della
5084 Rincon Ave.
Santa Rosa, CA 95409

CIS: 71675,765

Note: I will be leaving for Saudi Arabia March '91 (Yes, I'm in the Army.
I'm a Tank Platoon Leader) so if you have any instant pressing
questions, I'd recommend getting them in before then as having my
mail forwarded overseas and back again after that might just get you
a LONG response time. But keep on trying. I have no idea when I'll
be back from the dessert. Might just come home early!

 December 9, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>