Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag and Drop Word / PDF Documents
Message
From
03/02/2006 04:22:51
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01092797
Message ID:
01093256
Views:
23
I checked code
It shoul be
OleDrageOver ( on form event)
if oDataObject.getformat(15) 
	this.oledrophasdata = 1
	this.oledropeffects = 1
endif
__________________
 OlseDragDrop form event
if oDataObject.getformat(15) && CF_TEXT
	MyObj = "oMyLabel" + alltrim(tran(this.controlcount))
	this.addobject(MyObj,"label")
	Obj=EVALUATE('this.'+myobj)
***?? I have doubts here, something like this, or may be lnHandle= 
** oDataObject.getdata(15,@arrayhandel)
** and files handles shuold be taken from this array
	DIMENSION 	Handarray[1]
	= oDataObject.getdata(15,@Handarray)
	IF NOT EMPTY(Handarray[1])
		lnHandle=FOPEN(Handarray[1])
	ELSE
	RETURN
	endif
	IF TYPE('lnHandle')='N' AND lnHandle>0
	nSize =  FSEEK(lnHandle, 0, 2)  
	= FSEEK(lnHandle, 0, 0)      && Move pointer to BOF
	lString=FREAD(lnHandle,nSize)
	FCLOSE(lnHandle)
	Obj.Caption=lString
	Obj.left=nXCoord
	Obj.top=nYCoord
	Obj.fontsize = 14
	Obj.autosize = .T.
	Obj.forecolor = RGB(255,0,0)
	Obj.visible=.t.
	ENDIF
endif
-----------------------
Now if you run form and see at the same time some file of text format
on desktop or in some directory, drag it to runing VFP form
( not Word -which is binary
MVP-2006-2011, PHD in Math and Physics ,
host of www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.
Previous
Reply
Map
View

Click here to load this message in the networking platform