*Form.MouseDown LPARAMETERS nButton, nShift, nXCoord, nYCoord if nButton = 1 this.newobject("SPanel","SelPanel","Selector.prg","",; nXCoord,nYCoord) this.spanel.visible=.t. endif *Form.MouseUp LPARAMETERS nButton, nShift, nXCoord, nYCoord If nButton=1 and Type('this.Spanel')='O' this.Spanel.EndSelect() this.SelObjects() this.RemoveObject('Spanel') endif *Form custom selobjects With this.SPanel MessageBox(; Transform(.SelLeft)+'/'+; Transform(.SelTop)+'/'+; Transform(.SelHeight)+'/'+; Transform(.SelWidth) ) endwith *Selector.Prg Define Class selpanel As Container BackStyle = 0 BorderWidth=0 StartX = 0 StartY = 0 SelLeft = 0 SelTop = 0 SelHeight = 0 SelWidth = 0 Name = "selpanel" Add Object SelectorBox As Container With ; BackStyle = 0 Add Object SelShield As Container With ; BackStyle = 0,; BorderWidth = 0 Procedure Init Lparameters tnX, tnY This.StartX = tnX This.StartY = tnY With Thisform This.Width = .Width This.Height = .Height This.SelShield.Width = .Width This.SelShield.Height = .Height Endwith With This.SelectorBox .Left = tnX .Top = tnY .Height = 1 .Width = 1 Endwith Endproc Procedure SelShield.MouseMove Lparameters nButton, nShift, nXCoord, nYCoord If nButton = 1 With This.Parent.SelectorBox .Left = Min(nXCoord, This.Parent.StartX) .Top = Min(nYCoord, This.Parent.StartY) .Height = Abs(nYCoord - This.Parent.StartY) .Width = Abs(nXCoord - This.Parent.StartX) Endwith Endif Endproc Procedure SelShield.MouseLeave Lparameters nButton, nShift, nXCoord, nYCoord Thisform.MouseUp(nButton, nShift, nXCoord, nYCoord) Endproc Procedure EndSelect Lparameters tlDestroy With This.SelectorBox This.SelLeft = .Left This.SelTop = .Top This.SelHeight = .Height This.SelWidth = .Width Endwith This.RemoveObject('SelectorBox') This.RemoveObject('SelShield') If tlDestroy Thisform.RemoveObject(This.Name) Endif Endproc EnddefineCetin