if mdown() &&We clicked somewhere > lnNewRow = 0 > this.GridHitTest(mcol(), mrow(), '', @lnNewRow) > if lnNewRow <> this.relativerow > *** We are moving rows! > nodefault > else > *** We are moving columns! > endif >else > if inlist(lastkey(), 18, 3, 5, 24) > *** We are moving rows! > nodefault > else > *** We are moving columns! > endif >endif>Of course VFP7 makes this easier with RowColChange.
*BeforeRowColChange if mdown() lnBottom = objtoclient(this,1)+.headerheight+.relativerow * .rowheight lnTop = lnBottom - this.rowheight lnMouseRowPos = mrow(wontop(),3) lnMouseColPos = mcol(wontop(),3) llChangingRow = !(between(lnMouseRowPos,lnTop, lnBottom) ; and between(lnMouseColPos,; objtoclient(this,2),objtoclient(this,2)+.width)) else llChangingRow = inlist(lastkey(),24,5,18,3,145,148) endifCetin