Computer Science, asked by purohitkumar2513, 11 months ago

How can we draw a rectangle in QB64? Explain with an example.

Answers

Answered by arvindkakade
2
The LINE command can do more that draw line segments. It can be used to draw a rectangle either outlined or filled. BASIC uses the letter B to change the way that LINE works. After the color number you can place another comma and then the letter B to draw an outlined rectangle or the letters BF for a filled one. Think:

B → Box → Rectangle

F → Fill

If you do not want to use a COLOR number (and go with the default color), then you still need placeholder commas, placed as if the color number were present. The example program demonstrates this for the first two rectangles.
Similar questions