#code=936
ENVI^ ForceLocal=1
ENVI^ EnviMode=1
ENVI^ Alias -opt Rectangle=CALL $--qd#  --ret:* Gdi32,Rectangle,*dummy,
ENVI^ Alias -opt Ellipse=CALL $--qd#  --ret:* Gdi32,Ellipse,*dummy,


IFEX X.LOG, LOGS * X.LOG

SET &I=0
ENVI XXX=1
SET &w=100
SET &h=50 
SET &x0=130
SET &y0=130
SET &aw=2
SET &ah=2
TEAM set &L=| SET &T=| SET &R=| SET &B=
TEAM SET &L0=0| SET &T0=0
SET &XXX=1
WIN1 
//MESS XXX=%XXX%
_SUB WIN1,W260H320,画布演示,
    Envi @this.Paint=OnPaint     
    ENVI @this.POS=?&&左名:&&上名:::L0:T0
    ITEM &ITEM1,L100T250W60H30,OK, MESS  OK 
    TIME &Timer1,50, ENVI @this.InvalidateRect=;;;230;  //0
_END
_SUB OnPaint
    CALC XXX=%XXX% + 1
    CALC #L=%x0%-%w% - %L0%
    CALC #T=%y0%-%h%
    CALC #R=%x0%+%w% - %L0%
    CALC #B=%y0%+%h%    
//     Rectangle %1,%L%,%T%,%R%,%B%
     Rectangle %1,%T%,%L%,%B%,%R%
    Ellipse %1,%L%,%T%,%R%,%B%
    CALC #w= %w%  + %aw% 
    IFEX $%w%>100, TEAM SET aw=-2|CALC #w= %w%  + %aw%!  IFEX $%w%<0, TEAM SET aw=2|CALC #w= %w%  + %aw%
    CALC #h= %h%  + %ah% 
    IFEX $%h%>100, TEAM SET ah=-2|CALC #h= %h%  + %ah%!  IFEX $%h%<0, TEAM SET ah=2|CALC #h= %h%  + %ah%
_END

