************************************************** *-- Class: shpsizeable (d:\test\classes\test.vcx) *-- ParentClass: shape *-- BaseClass: shape * DEFINE CLASS shpsizeable AS shape Height = 116 Width = 107 threshhold = 3 Name = "sizeable" InResize = .F. ldraglb = .F. ldragbb = .F. ldragtb = .F. ldragrb = .F. PROCEDURE MouseMove LPARAMETERS nButton, nShift, nXCoord, nYCoord IF this.inResize IF this.ldraglb IF nXCoord < this.left this.width = this.width + abs(this.left - nXCoord) ELSE this.width = max(this.width - abs(this.left - nXCoord),0) ENDIF this.left = nXCoord ENDIF IF this.ldragtb IF nYCoord < this.top this.height = this.height + abs(this.top - nYCoord) ELSE this.height = max(this.height - abs(this.top - nYCoord),0) ENDIF this.top = nYCoord ENDIF IF this.ldragrb IF nXCoord < this.left + this.width this.width = max(this.width - abs(this.left + this.width - nXCoord),0) ELSE this.width = this.width + abs(this.left + this.width - nXCoord) ENDIF ENDIF IF this.ldragbb IF nYCoord < this.top + this.height this.height = max(this.height - abs(this.top + this.height - nYCoord),0) ELSE this.height = this.height + abs(this.top + this.height - nYCoord) ENDIF ENDIF ELSE this.ldraglb = between(nXCoord,this.left-this.threshhold,this.left+this.threshhold) this.ldragtb = between(nYCoord,; this.top - this.threshhold, this.top+this.threshhold) this.ldragrb = between(nXCoord,; this.left+this.width-this.threshhold,this.left+this.width+this.threshhold) this.ldragbb = between(nYCoord, ; this.top+this.height-this.threshhold, this.top+this.height+this.threshhold) DO case CASE this.ldraglb and this.ldragtb ; or this.ldragrb and this.ldragbb this.mousepointer = 8 CASE this.ldraglb and this.ldragbb ; or this.ldragrb and this.ldragtb this.mousepointer = 6 CASE this.ldragrb or this.ldraglb this.mousepointer = 9 CASE this.ldragtb or this.ldragbb this.mousepointer = 7 OTHERWISE this.mousepointer = 0 ENDCASE ENDIF ENDPROC PROCEDURE MouseDown LPARAMETERS nButton, nShift, nXCoord, nYCoord this.ldraglb = between(nXCoord,this.left-this.threshhold,this.left+this.threshhold) this.ldragtb = between(nYCoord,; this.top - this.threshhold, this.top+this.threshhold) this.ldragrb = between(nXCoord,; this.left+this.width-this.threshhold,this.left+this.width+this.threshhold) this.ldragbb = between(nYCoord, ; this.top+this.height-this.threshhold, this.top+this.height+this.threshhold) this.inResize = this.ldraglb or this.ldragtb or this.ldragrb or this.ldragbb ENDPROC PROCEDURE MouseUp LPARAMETERS nButton, nShift, nXCoord, nYCoord this.inResize = .f. ENDPROC ENDDEFINE * *-- EndDefine: shpsizeable **************************************************Cetin