Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE Drag Picture Question 1

Status
Not open for further replies.

jcairo

Technical User
Jul 23, 2007
10
PT
I am writing an app where the user can drag and drop image files from a folder onto my vfp form. I am using vista OS and OLEDragDrop methods. When I select the image files from my source folder and drag them, I have the nice vista icon with small pictures of my selected images, but as soon as I drag over my vfp form the cursor changes to the old (xp?) icon... a small hatched rectangle with an arrow. Can anyone tell me if it's possible to make vfp9 display the vista drag icon?
Thanks in advance!
 
unfortunately each app is respnsible for showing an oledragpicture, it's not a global setting for the whole drag operation. The reason is, each app needs to give response about the drag being possible or not and does so with the dragged icon.

The good news is, you have the OleDragPicture property and you can set that to any picture files. The bad news is, you won't know the pic Vista uses for the drag operation from the oDataObject parameter of the DragOver event. You'll need to extract the file name dragged and then find the associated icon of that file. I have no code at hand to do that, but you might set OleDragPicuture according to the file extension.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top