Basic Program to Read Characters from the Screen into a String (43527)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q43527 SUMMARY
The program below demonstrates how to use the PEEK statement to read
text that is printed on the screen into a Basic string variable. The
program PEEKs video memory (at segment B000h) to read the
characters from the screen.
(Note: An easier method to read characters from the screen is to use
the SCREEN function, which reads a character's ASCII value or its
color from a specified screen location.)
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB43527 |
---|
|