Dec 232017
 
This UNIT for Turbo Pascal version 4.0 provides control of the size and placement of the cursor. Full source is included.
File CURSOR5.ZIP from The Programmer’s Corner in
Category Pascal Source Code
This UNIT for Turbo Pascal version 4.0 provides control of the size and placement of the cursor. Full source is included.
File Name File Size Zip Size Zip Type
CURSORS.DOC 2149 923 deflated
CURSORS.PAS 2864 910 deflated

Download File CURSOR5.ZIP Here

Contents of the CURSORS.DOC file


{ CURSORS -- A unit for changing the appearance of the display cursor.

Version 1.02 - 10/26/1987 - First general release

Scott Bussinger
Professional Practice Systems
110 South 131st Street
Tacoma, WA 98444
(206)531-8944
Compuserve 72247,2671

This UNIT for Turbo Pascal version 4.0 provides control of the size and
placement of the cursor on computers compatible with the IBM PC BIOS. No
direct manipulation of hardware is used. To include this unit in your
program, add CURSORS to the USES clause in your main program.
The main procedure provided by this unit is called MakeCursor and is used to
set the cursor to a particular shape. Several pre-defined constants for this
procedure are provided; UnderlineCursor, BlockCursor, NoCursor, and
RestoreCursor which set the cursor shape to an normal underline, a full height
box, no cursor at all, and return the cursor to the size in effect when the
program was started. Note that the cursor is automatically restored to its
original state when your program halts.
This unit also defines a new data type called CursorSize which defines the
first and last scan lines of a cursor along with routines GetCursor and
SetCursor to examine and change the current cursor shape.
Version 1.01 also adds two routines for determining and changing the
location of the cursor. These routines provide similar functions to SaveX,
SaveY, and GotoXY in the CRT unit.
Compile this file as a demonstation of a program calling MakeCursor. }

program Test;

uses Cursors;

begin
writeln('A Block cursor. Hit ENTER to continue.');
MakeCursor(BlockCursor);
readln;

writeln('An underline cursor. Hit ENTER to continue.');
MakeCursor(UnderlineCursor);
readln;

writeln('No cursor at all. Hit ENTER to continue.');
MakeCursor(NoCursor);
readln;

writeln('The original cursor restored. Hit ENTER to continue.');
MakeCursor(RestoreCursor);
readln;

writeln('A Block cursor once again. Hit ENTER to continue.');
MakeCursor(BlockCursor);
readln;

writeln('The original cursor is automatically restored. Hit ENTER to continue.')
end.


 December 23, 2017  Add comments

Leave a Reply