0% found this document useful (0 votes)
72 views2 pages

Circles Program in Qbasic

This program draws four colored circles that increase in size from the center of the screen outward, with the color changing in a cycle, until a key is pressed. It defines variables for the screen dimensions and color, then creates a full screen image and hides the mouse. Inside a loop, it draws four circles centered at the screen edges and middle, increasing the size and changing the color, before redrawing and checking for a key press.

Uploaded by

madirajunaveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views2 pages

Circles Program in Qbasic

This program draws four colored circles that increase in size from the center of the screen outward, with the color changing in a cycle, until a key is pressed. It defines variables for the screen dimensions and color, then creates a full screen image and hides the mouse. Inside a loop, it draws four circles centered at the screen edges and middle, increasing the size and changing the color, before redrawing and checking for a key press.

Uploaded by

madirajunaveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

DIM DH AS INTEGER

DIM DW AS INTEGER
DIM Col AS INTEGER
DIM x AS INTEGER

DW = _DESKTOPWIDTH
DH = _DESKTOPHEIGHT

SCREEN _NEWIMAGE(DW, DH, 256)


_FULLSCREEN
_MOUSEHIDE

DO

Col = 0
FOR x = 1 TO DW * 1.5
_LIMIT 100
CIRCLE (DW / 2 - 1 + x, DH / 2 - 1 + x), x, Col
CIRCLE (DW / 2 - 1 - x, DH / 2 - 1 + x), x, Col
CIRCLE (DW / 2 - 1 + x, DH / 2 - 1 - x), x, Col
CIRCLE (DW / 2 - 1 - x, DH / 2 - 1 - x), x, Col
Col = Col + 1
IF Col = 256 THEN
Col = 0
END IF
_DISPLAY
NEXT
LOOP UNTIL INKEY$ <> ""
_MOUSESHOW

--------------4circles.bas

2) program
----------------

DIM DH AS INTEGER
DIM DW AS INTEGER
DIM Col AS INTEGER
DIM x AS INTEGER

DW = _DESKTOPWIDTH
DH = _DESKTOPHEIGHT

SCREEN _NEWIMAGE(DW, DH, 256)


_MOUSEHIDE
_FULLSCREEN

DO

Col = 255
FOR x = 1 TO DW * 3
_LIMIT 100
CIRCLE (0 + x, 0 + x), x, Col
CIRCLE (0 + x, DH - x), x, Col
CIRCLE (DW - x, 0 + x), x, Col
CIRCLE (DW - x, DH - x), x, Col
Col = Col - 1
IF Col = -1 THEN
Col = 255
END IF
_DISPLAY
NEXT
LOOP UNTIL INKEY$ <> ""
_MOUSESHOW

You might also like