| CRT Documentation: Reference |
[Some procedures and functions have changed from their original DOS versions.]
The following procedures and functions are declared in the Delphi Crt unit.
| Procedure / Function | Description |
|---|---|
| AssignCrt | Associates a text file with the Crt window. |
| ClrEol | Clears all the characters from the cursor position to the end of the line. |
| ClrScr | Clears the screen and returns the cursor to the upper left corner. |
| Delay | Delays a specifed number of milliseconds. |
| DelLine | Deletes the line containing the cursor. |
| GotoXy | Moves the cursor to the given coordinates within the virtual screen. |
| HighVideo | Selects high-intensity characters. |
| InsLine | Inserts an empty line at the cursor position. |
| KeyPressed | Determines if a key has been pressed on the keyboard. |
| LowVideo | Selects low-intensity characters. |
| NormVideo | Selects the original text attribute read from the cursor location at startup. |
| NoSound | Turns off the computer's internal speaker. |
| ReadKey | Reads a character from the keyboard. |
| Sound | Starts the internal speaker. |
| TextBackground | Selects the background color. |
| TextColor | Selects the foreground character color. |
| TextMode | Selects a specific text mode. |
| WhereX | Returns the X coordinate of the current cursor location. |
| WhereY | Returns the Y coordinate of the current cursor location. |
| Window | Defines a text window on the screen. |
These functions were included to enhance the Delphi Crt unit. Turbo Pascal and Borland Pascal do not support these functions in their Crt unit.
| Procedure / Function | Description |
|---|---|
| FreeCrtState | Disposes of memory allocated by a call to SaveCrtState. |
| GetControlKeyState | Returns the status of the control keys. |
| IsAltPressed | Returns the status of the Alt key. |
| IsCtrlPressed | Returns the status of the Ctrl key. |
| IsShiftPressed | Returns the status of the Shift key. |
| RestoreCrtState | Restores the state of the console to a previously saved state. |
| SaveCrtState | Saves the current state of the console so it may be restored later. |
| ScreenX | Returns the true X coordinate of the current cursor location. |
| ScreenY | Returns the true Y coordinate of the current cursor location. |
| ScreenHeight | Returns the height of the screen. |
| ScreenWidth | Returns the width of the screen. |
| SetScreenSize | Sets the width and height of the screen. |
| SetCursorType | Changes the appearance of the screen cursor. |