qbasic.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
VIEW Statement
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Defines the size and location of a viewport where graphics can be displayed
on the screen.
 
VIEW [[SCREEN] (x1!,y1!)-(x2!,y2!) [,[color%] [,border%]]]
 
    ■ SCREEN                 Specifies that coordinates are relative to the
                             screen rather than the viewport.
    ■ (x1!,y1!)-(x2!,y2!)    The coordinates of diagonally opposite corners
                             of the viewport.
    ■ color%                 A color attribute that sets the viewport fill
                             color.
    ■ border%                A color attribute that sets the viewport border
                             color.
 
    ■ If all arguments are omitted, the entire screen is the viewport.
    ■ The available color attributes depend on your graphics adapter and the
      screen mode set by the most recent SCREEN statement.
 
Example:
    'This example requires a color graphics adapter.
    SCREEN 1
    VIEW (10, 10)-(300, 180), , 1
    LOCATE 1, 11: PRINT "A big graphics viewport";
    VIEW SCREEN (80, 80)-(200, 125), , 1
    LOCATE 11, 11: PRINT "A small graphics viewport";
 
See Also    CLS    SCREEN    VIEW PRINT    WINDOW
            Color Attributes and Values    Screen Modes