rectangle()

Draws a filled rectangle with current ink color on current screen.

Syntax:
rectangle( x, y, w, h, mode )

x
and y are upper left rectangle point coordinates while w and h are the rectangle width and height.
mode
parameter sets the filling mode.
mode = 0 outline
mode  = 1 filled

Example:
while not key(k_esc)
    cls    
    bar( 100, 100, Xmouse, Ymouse )
    waitVBL
wend