** Make table
CREATE TABLE gridtest (color c(10), fruit c(15), quantity i)
INSERT INTO gridtest VALUES ("Red","Apple",5)
INSERT INTO gridtest VALUES ("Blue","Pear",10)
INSERT INTO gridtest (fruit) VALUES ("Peach")
INSERT INTO gridtest (COLOR) VALUES ("Green")
INSERT INTO gridtest (quantity) VALUES (7)
INSERT INTO gridtest (COLOR,fruit) VALUES ("Black","Blackberry")
INSERT INTO gridtest (COLOR,quantity) VALUES("Orange",3)
INSERT INTO gridtest (fruit,quantity) VALUES ("Orange",8)
INSERT INTO gridtest (fruit,COLOR) VALUES ("Banana","Indigo")
LPARAMETERS nEffect, eMouseCursor
IF nEffect=0
eMouseCursor=12 && the no drop circle with line
ELSE
eMouseCursor="bullseye.cur"
ENDIF
COPY FILE HOME(4)+"Cursors\bullseye.cur" TO SYS(5)+SYS(2003)
LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, ;
nYCoord, nState
LOCAL nWhere
nWhere=0
IF This.GridHitTest(nXCoord,nYCoord,@nWhere)
IF nWhere=3 && over a grid cell
nEffect=3
ELSE
nEffect=0 && if not over a grid cell, can't drop
ENDIF
ENDIF
LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord
LOCAL nOperation, cText, nWhere, nRelRow, nRelCol
IF nShift=2 && Control key is down
nOperation=1 && DropEffect_Copy
ELSE
nOperation=2 && DropEffect_Move
ENDIF
IF This.GridHitTest(nXCoord,nYCoord,@nWhere,@nRelRow,@nRelCol)
IF nWhere=3 && over a grid cell
This.ActivateCell(nRelRow,nRelCol)
ENDIF
ENDIF
IF oDataObject.GetFormat(1) && CF_TEXT
cText=oDataObject.GetData(1)
This.Columns(nRelCol).Text1.Value=cText
NODEFAULT
ENDIF
nEffect=nOperation && nEffect gets passed to OLECompletDrag