PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form desktop = .t. autocenter = .t. Height = 581 Width = 765 DoCreate = .T. Caption = "Form1" Name = "Form1" PROCEDURE Init #define numero 20 this.AddProperty([posti(numero)],null) stepAngle = 2*PI()/numero XCenter = (this.width-60)/2 YCenter = (this.height-60)/2 radius = 200 FOR k=1 TO numero this.AddObject("posti["+LTRIM(STR(m.k))+"]","Posto") WITH this.Controls[m.k] .Fillcolor = MOD(m.k,2)*255 .Rotation = RTOD(stepAngle*m.k) .Move(m.XCenter - m.radius*COS(m.stepAngle*m.k),m.YCenter + m.radius*SIN(m.stepAngle*m.k)) .Visible = .t. ENDWITH NEXT this.AddProperty([camerieri(3)],null) FOR k=1 TO 3 this.AddObject("camerieri["+LTRIM(STR(m.k))+"]","maid") NEXT ENDPROC ENDDEFINE DEFINE CLASS Posto AS Shape * is need a square heighT = 60 width = 60 backstyle = 0 FillStyle = 0 DIMENSION aPoints(4,2) aPoints = 30 aPoints[2,1] = 70 aPoints[3,1] = 70 aPoints[3,2] = 70 aPoints[4,2] = 70 PolyPoints = "this.aPoints" ENDDEFINE DEFINE CLASS maid AS Image height = 64 width = 64 backstyle = 0 Stretch = 1 Picture = HOME(2)+"TASTRADE\BITMAPS\CALLLAUR.BMP" CountMove = 1 Target = 0 PROCEDURE Init this.Move(thisform.Width/2,thisform.Height/2) ADDPROPERTY(m.this,"movetime",CREATEOBJECT("timer")) BINDEVENT(m.this.movetime,"Timer",this,"Moving") this.movetime.Interval = 100 this.Visible = .T. PROCEDURE Moving IF m.This.CountMove=1 this.Target =INT(RAND()*numero)+1 This.CountMove = 5+INT(RAND()*10) ELSE this.CountMove = m.This.CountMove-1 ENDIF DEBUGOUT this.Target,THIS.CountMove WITH THISFORM.posti[m.this.Target] RETURN this.Move(THIS.Left+(.left-THIS.Left)/THIS.CountMove,THIS.Top+(.Top - THIS.Top)/THIS.CountMove) ENDWITH ENDDEFINE