ReadyBASIC
BASIC Language Reference Manual > Command and Function Reference >

BOX Command

Summary

Draws a box (an unfilled rectangle) on the screen using the current graphics pen color.

Syntax

BOX x1 coordinate, y1 coordinate, x2 coordinate, y2 coordinate

Remarks and Examples

The BOX command will draw an unfilled rectangle on the screen from the (x1, y1) coordinate to the (x2, y2) coordinate.

The rectangle will be drawn using the current graphics pen color. The graphics pen color can be changed using the PENCOLOR command.

Examples:

REM Draw a cyan rectangle from (100, 150) to (400, 200)
PENCOLOR 0, 255, 255
BOX 100, 150, 400, 200

See also: BAR, PENCOLOR, Overview of Graphics Programming in ReadyBASIC




Copyright 2006-2012, Kevin Matz, All Rights Reserved.