LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to drag and drop to desktop

One more note: After you created your IDropSource and IDataObject you will probably want to use DoDragDrop() from ole32. This function will sit there and wait in a loop until the user has finished the operation either by dropping the object somewhere or by canceling it.

You might be able to create the IDataObject through a shell API from the file path but there is probably no way around implementing your own IDropSource COM object yourself.

RolfKalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 21
(2,886 Views)

Hi jeyanthi,

here is an example how you can drag and drop from a ListBox in LabView to your Desktop. It works without additional c files, only with the windows API. It´s only a short example.

Hope it helps.
Mike

Message 12 of 21
(2,869 Views)


@MikeS81 wrote:

Hi jeyanthi,

here is an example how you can drag and drop from a ListBox in LabView to your Desktop. It works without additional c files, only with the windows API. It´s only a short example.

Hope it helps.
Mike


Nice work! Smiley Happy
But putting this into a DLL wouldn't be more work really. (If you know how to operate a C compiler which you Mike most probably do judging from the VIs. It's definitly not a trivial exercise to do it all in LabVIEW.) Smiley Very Happy

Also I wonder if at least part of the middle loop couldn't be avoided by using the Drag Starting(?) event in LabVIEW.

Rolf Kalbermatter


Message Edited by rolfk on 07-10-2008 10:46 AM
Rolf Kalbermatter
My Blog
Message 13 of 21
(2,848 Views)
Duplicate deleted.

Rolf Kalbermatter


Message Edited by rolfk on 07-10-2008 10:46 AM
Rolf Kalbermatter
My Blog
Message 14 of 21
(2,847 Views)

Hi rolf,

yes you are right, there is definitely a better way to do it. This should only show that it is possible. Smiley Happy

Mike

0 Kudos
Message 15 of 21
(2,842 Views)
can i  have 8.0 version  example
0 Kudos
Message 16 of 21
(2,835 Views)

Hi jeyanthi,

here it is for LV80. You have to clean the errors, because there are some differences between LabView 8.5 and 8.0 in calling a dll.

Mike

0 Kudos
Message 17 of 21
(2,807 Views)
can i have the one without the error. plz. cos i try fixing the error but it still can run  and sending the error . plz help
0 Kudos
Message 18 of 21
(2,775 Views)
Hi jeyanthi,
without which error? If you can run the vi, than there should be no error.
Mike
0 Kudos
Message 19 of 21
(2,766 Views)


MikeS81 wrote:

Hi jeyanthi,

here is an example how you can drag and drop from a ListBox in LabView to your Desktop. It works without additional c files, only with the windows API. It´s only a short example.


Excellent work, Mike! Smiley Happy
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 20 of 21
(2,745 Views)