Funny you should mention the latter (http://www.aksel.com/whitepapers/DragDrop.htm).  I found that on Google search right after firing this post into the group here. His example fails

LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord, nState

IF oDataobject.getformat(1)
   Lc = oDataobject.GetData(1)
   THIS.AddItem(lc)
ENDIF

IF oDataobject.getformat("VFP Source Object")
   lo = oDataobject.GetData("VFP Source Object")
   ** lo is now a pointer to the object itself

   FOR lni = 1 TO lo.ListItems && <------ this fails saying "Property ListItems is not found."

      IF lo.Selected(lni)
         MESSAGEBOX(lo.ListItems(lni))
      ENDIF
   ENDFOR
ENDIF


Off to Debug .....


On 5/3/2021 3:50 PM, Frank Cazabon wrote:

Might help you with the debugging:

OLE Drag and Drop | Hacker’s Guide to Visual FoxPro (hackfox.github.io) <https://hackfox.github.io/section4/s4g830.html>

Might help with specifics:

Using Drag and Drop In Visual FoxPro (aksel.com) <http://www.aksel.com/whitepapers/DragDrop.htm>


Frank.

Frank Cazabon

On 03/05/2021 3:43 pm, MB Software Solutions, LLC wrote:
Many many moons ago I did some drag and drop code, but I have forgotten completely and it's no longer in my possession anyway. I want to drag names amongst a screen full of listboxes: https://www.screencast.com/t/6M8XxvSFV

I know I need to code in the OLEDragDrop event and native VFP Help sucks, not really showing me anything.

I was thinking the oDataObject was the listbox where the drag started but no.  I tried to SET STEP ON but VFP says "CANCEL or SUSPEND is not allowed."

LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord
LOCAL loLB as ListBox
loLB = oDataObject
wait window loLB.ListCount  && this fails

SET STEP ON  && this doesn't work either


I have the properties set correctly to allow me to drag from one list to another but now I'm stuck.  Going to search the archives next but throwing this out there in the meantime.  Was hoping to have drag/drop implemented by the time I had a ZOOM call with my fellow hockey captains to set the teams tonight!

tia,
--Michael





--- StripMime Report -- processed MIME parts ---
multipart/alternative
 text/plain (text body -- kept)
 text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/eaa7276a-7fa2-0821-7832-cf4a7c4ee...@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to