LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I drag and drop files from LabVIEW into windows?

I have a listbox with file names. I need a way to allow the user to drag and drop the files from LabVIEW to his hard drive. (the files are located on an external drive)
0 Kudos
Message 1 of 6
(3,254 Views)
Hi,

In theory it is possible, however the implementation can be painful. to implemnt this you would have to do something like this:

  1. Find out what is the window that the user draged the file to. You could use the windows SDK function GetActiveWindow(...)
  2. Once you have the handle to the window you have to post a WM_DROPFILES message to the window. You would use the SendMessage(,,,) function.

It would be easier to implement this in a DLL, but this will be no easy task.

Let me know if you have any further questions.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 6
(3,254 Views)
Hi:

I believe George Zhou's Win Utilities allows you to do this. Do a google search on LabVIEW Win Utilities or something like that.

Robert
0 Kudos
Message 3 of 6
(3,254 Views)
I could not find the Win Utilities, but I saw then some time ago and I belive that they allow you to drag and drop files from a explorer window to the VI, but I'm not sure if they allow you to do it the other way arround.

Just my 2 cents.

J.C.
0 Kudos
Message 4 of 6
(3,254 Views)
Yes. You can do both way. Here is the link:

http://www.geocities.com/gzou999/index.html
or
http://gtoolbox.yeah.net (easy to remember)



George Zou
SI
George Zou
0 Kudos
Message 5 of 6
(3,254 Views)
Thanks a lot this is great!

Juan Carlos
0 Kudos
Message 6 of 6
(3,254 Views)