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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag and Drop from VFP Program 1

Status
Not open for further replies.

sjpatrick

Programmer
Sep 4, 2001
54
US
Here's the deal: we receive address lists from customers in Excel format for shipping the products we make.

I've written a truly good Wizard in VFP6 that imports the file, holds the user's hand through some simple manipulation, does a little Bainesian magic and Presto! A csv or delimited file is created (depending on the carrier) that can be imported into the carrier's software.

Until now, the resulting file was automativally written to the user's floppy drive. Now my boss (who loved my Wizard otherwise) tells me that the carriers' computers will soon be on our network and he wants the results delivered in another fashion.

The solution I came up with that would work the best would be to give the user an icon for the file in a vfp form that they could drag to wherever they wanted.

The problem with this solution is that I don't know how to do this.

Any thoughts?

Thanks in advance for any help,
Steve
 
Steve,
DO _samples+"\solution\solution.app"

This application has a number of different Drap and Drop samples. There are a couple different techniques required depending on whether it's "standard" D&D or OLE D&D.

See:
Controls -> General -> Allow Users to Drag and Drop Controls
New Features for VFP 6.0 -> Treeview/Listbox drag and drop
New Features for VFP 6.0 -> Fun with OLE drag and drop
New Features for VFP 6.0 -> OLE drag and drop data formats

Rick

 
Steve

A couple of thoughts - you could allow a user to drag 'n drop from a folder in Windows Explorer or you could offer a list of files in a grid in VFP and the user could drag 'n drop from VFP.

If you chose the Windows Explorer route you could create in instance of Windows Explorer from within VFP, launching it in the chosen folder so the user does not have to go looking for the file(s}. If the folder was specifically created for the purpose, you would only be showing files relative to your application.

It would be more intuititive to drag 'n drop from a grid in VFP rather than an icon as you can simulate the look and feel of Windows Explorer by having a bitmap to the left of the path\filename.ext emulating the icons to be found in Windows Explorer, followed by the file's size, date, time and attributes.

Either way it's OLE drag 'n drop you need to consider as it's an external process - native drag 'n drop only works within a VFP application.

FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top