$APPTYPE GUI: $TYPECHECK ON
DEFLNG hdc,gdc
DEFINT clr,x1,x2,y1,y2
DECLARE SUB epress (key AS BYTE)
DECLARE SUB edraw
DIM tick AS QDXTIMER
tick.interval = 0
tick.ontimer = edraw
CREATE Me AS QFORM
borderstyle = 3
CAPTION = "Animate Lines"
width = 440
height = 340
COLOR = &hffffff
center
onkeyup = epress
END CREATE
tick.enabled = 1
Me.SHOWMODAL
SUB epress (key AS BYTE)
IF key = 27 THEN Me.CLOSE
END SUB
SUB edraw:
x1=RND(Me.clientwidth): x2=RND(Me.clientwidth)
y1=RND(Me.clientheight): y2=RND(Me.clientheight)
clr=RGB(RND(256),RND(256),RND(256))
Me.Line x1,y1,x2,y2,clr
END SUB
|