Hi Kenneth,
Check this article...
http://www.news2news.com/vfp/?example=323&function=478MartinaJ
>Hi,
>
>I am trying to enable the _SCREEN object so that it receives file names as an OLE Drop from a Windows Explorer Drag. I have no problems being able to do this unto a regular FORM, however, it is the main VFP SCREEN that I want to do this with. Running the code below doesn't result in errors but it also doesn't trigger anything.
>
>
>
>_SCREEN.OLEDROPMODE = 1
>*!*_SCREEN.OLEDROPEFFECTS = 4
>
>oScrOleDrop = CREATEOBJECT("ScrOleDrop")
>BINDEVENT(_SCREEN,"OLEDragDrop",oScrOleDrop,"OLEDRAGDROP")
>BINDEVENT(_SCREEN,"OLEDragOver",oScrOleDrop,"OLEDRAGOVER")
>
>DEFINE CLASS ScrOleDrop AS Custom
> PROCEDURE OLEDRAGDROP
> LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord
> IF oDataObject.GETFORMAT(15)
> LOCAL laFiles(1)
> oDataObject.GETDATA(15,@laFiles)
> FOR EACH lcFile IN laFiles
> WAIT WINDOW lcFile
> NEXT
> ENDIF
> ENDPROC
>
> PROCEDURE OLEDRAGOVER
> LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord, nState
> DO CASE
> CASE nState == 0
> IF oDataObject.Getformat(15)
> _SCREEN.OLEDropHasData = 1
> _SCREEN.OLEDropEffects = 4
>
> THIS.OLEDropHasData = 1
> THIS.OLEDropEffects = 4
>
> nEffect = 4
> ENDIF
> CASE nState == 1
> *!* CASE nState == DRAG_OVER
> *!* WAIT WINDOW "Drag over"
> ENDCASE
> ENDPROC
>ENDDEFINE
>