LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy and paste files from Windows Explorer

Hi everybody,

For a part of my application I need to copy and paste files and folders from Windows explorer to the vi shown in the picture.
Does anybody know how to implement this with the clipboard functionality.
Also drag and drop would be very nice (but thats maybe a later step...)

Best regards, Helmut

0 Kudos
Message 1 of 4
(2,997 Views)
Hello Friedr,

drag and drop is the easy part!
Use a path control, this will naturally allow drag and drop. If a file is dropped on this a 'Value Change' event is fired! with this event you can load the data into the picture. To get a nice drag and drop functionality you should make the path transparent and resize to the size of the picture control. This will work fluently!

To use the clipboard, LV 8 has an functionality for this, I think it is an application event.

Success Ton

PS I didn't see you image maybe it was removed when you did a preview these have the bad habit of removing the attachments!
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(2,993 Views)
Hi Ton,

thank you very much for your fast reply.
Unfortunately I must use the multicolumn list element for the drag and drop event and this control must be on the front so the user is able to select a row. (But its a good info for other parts of the application, I didnt know that this functionality is already implemented in the path control)
Here is the URL of the picture: http://www.he-datentechnik.de/FOTO/processfolder.png to give you an info about the program.
The related part should work in the same way like the Windows Explorer, only some database related adds are included.

The Clipboard functionality I had to code in LV 7.0 (I dont want to update the runtimes of a few hundred users - never change a running system...)
I only had in mind some API function like CF_HDROP and DragQueryDropFileInfo() but I currently dont know how to implement it.

Best regards and thanks again, Helmut

0 Kudos
Message 3 of 4
(2,986 Views)
Hello Helmut,

sorry 7.0 has been a long time for me...... So I'm not sure about drag and drop. You could use a mouse enter event or something. For the clipboard I think this board can give you  som info!

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 4
(2,972 Views)