dos_compilers/Microsoft QuickBASIC v45/ADVR_EX/WINDO_EX.BAS
2024-07-01 21:19:24 -07:00

28 lines
759 B
QBasic
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'
' *** WINDO_EX.BAS -- WINDOW statement programming example
'
PRINT "Press ENTER to start."
INPUT;"",A$
SCREEN 1 : COLOR 7 'Grey screen.
X = 500 : Xdelta = 50
DO
DO WHILE X < 525 AND X > 50
X = X + Xdelta 'Change window size.
CALL Zoom(X)
FOR I = 1 TO 1000 'Delay loop.
IF INKEY$ <> "" THEN END 'Stop if key pressed.
NEXT
LOOP
X = X - Xdelta
Xdelta = -Xdelta 'Reverse size change.
LOOP
SUB Zoom(X) STATIC
CLS
WINDOW (-X,-X)-(X,X) 'Define new window.
LINE (-X,-X)-(X,X),1,B 'Draw window border.
CIRCLE (0,0),60,1,,,.5 'Draw ellipse with x-radius 60.
PAINT (0,0),1 'Paint ellipse.
END SUB