> >If nButton = 1 AND VARTYPE(Sys(1270))=='O' AND Sys(1270)=m.this > Thisform.AddObject( Sys(2015), "shape") > With Thisform.Controls[thisform.ControlCount] > .Move(nXCoord,nYCoord,25,25) > .Curvature = 99 > .BackColor = 255 > .BackStyle = 1 > .borderwidth = 2 > .bordercolor = 65535 > .SpecialEffect = 0 > .ToolTipText = "Crime scene" > .Visible = .T. > Endwith >Endif >>
* the table circleName C(10) NOT NULL, nX I NOT NULL,nY I NOT NULL * index on circleName tag PK && add for a shared support * Save loop with thisform.controls[...] && a shape circle INSERT INTO thetable values (.Name,.Left,.Top) .... * add a parameter Name to the .mapImage.MouseUp LPARAMETERS nButton, nShift, nXCoord, nYCoord, Name If pcount()=5 OR nButton = 1 AND VARTYPE(Sys(1270))=='O' AND Sys(1270)=m.this Thisform.AddObject(IIF(PCOUNT()=5,m.Name,Sys(2015)), "shape") With Thisform.Controls[thisform.ControlCount] .Move(nXCoord,nYCoord,25,25) .Curvature = 99 .BackColor = 255 .BackStyle = 1 .borderwidth = 2 .bordercolor = 65535 .SpecialEffect = 0 .ToolTipText = "Crime scene" .Visible = .T. Endwith Endif * RightClick refresh with thisform.mapImage SELECT THETABLE SCAN && FOR NOT PEMSTAT(m.thisform,circleName,5) && add for a shared support .MouseUp(null,null,nX,nY,circleName) ENDSCAN endwith