LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to drag and drop to desktop

hi need help how to drag data from listbox to desktop
0 Kudos
Message 1 of 21
(4,136 Views)


@jeyanthi wrote:
hi need help how to drag data from listbox to desktop


LabVIEW's D&D support in 8.5.x only allows dragging and dropping between LabVIEW front panels not between external applications and LabVIEW.

Maybe that George Zou has something in his G Toolbox.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 2 of 21
(4,134 Views)
You cannot do it.May i know your application?
0 Kudos
Message 3 of 21
(4,124 Views)
actually wat i was trying to do is i have a vi which list all the text files in a folder.
then i want drag one of the text files to my destop or different directory .
it is possible?
 
0 Kudos
Message 4 of 21
(4,068 Views)

Hi Jeyanthi,

AFA LV is concerned, the list of all text files in a folder is just a list of names/strings in the LV program. They are not actual files to LV, so that you can drag & drop to some other location.

So, it is not possible. Smiley Happy

- Partha ( CLD until Oct 2024 🙂 )
Message 5 of 21
(4,050 Views)
Alternatively u can view your desktop in your front panel.Smiley Very Happy
Message 6 of 21
(4,042 Views)

Hi jeyanthi,

how do you want to do it? Do you want to select maybe an entry of a listbox and drag it to the desktop, which means that you want to copy the selected entry (which represents a file) to the desktop? I think therefore you have to get the event that you drop on the desktop, maybe there are some API functions which you can use. If you have the drop target you have to program the functionality to copy the file from the start path to the selected path.

Hope it helps.
Mike

Message 7 of 21
(4,039 Views)

hi Mike, i just want to do  like tht can i get an example plz.

i want to select  an entry of a listbox let say i have this two thing in my listbox which it gets from the c://Documents folder

abc.txt

cdf.txt

 thn i choose abc.txt and drag it to the desktop.is it possible?

can i get some example plz.

 

0 Kudos
Message 8 of 21
(3,984 Views)
you select the file name from your list box, and also get that file path, use copy.vi---> its is file--> advanced file function. u can copy the same file and then transfer to anywhere...
 
it is possible...!
 
 
Balaji DP
Application Engineer
Regards,
Balaji DP
0 Kudos
Message 9 of 21
(3,978 Views)


@jeyanthi wrote:

hi Mike, i just want to do  like tht can i get an example plz.

i want to select  an entry of a listbox let say i have this two thing in my listbox which it gets from the c://Documents folder

abc.txt

cdf.txt

 thn i choose abc.txt and drag it to the desktop.is it possible?

can i get some example plz.



This should be actually possible but not without external code, aka. writing a DLL. Basically the DragSource event in LabVIEW is there so now you "only" need to write some C code that instantiates your own IDropSource, IDataObject and friends COM object and that then sits there in a loop and waits until the user has either finished or canceled the data transfer.

The issue gets more complicated since you will probably have to also detect if the target is LabVIEW itself in which case you would need to cancel the operation somehow and pass the handling to LabVIEW.

All in all you will need a rather thorough understanding of COM in general and COM data object handling in particular. Also some good C++ knowledge is probably an absolute requirement to be able to even get something that works at least somehow. And then some extra knowledge about interfacing LabVIEW to C code. I would expect this solution to get rather complicated. Partly because it is difficult in principle and partly because you will need to work around some limitations that LabVIEW's architecture will impose on you as it is trying to do as much as possible for you in general but that might get in the way when you want to do something like this.

Quite interesting task to solve but I would rate its difficulty to implement it with five stars on a range of 1 to 6. Definitly not something for someone who has not a quite sound understanding of C/C++ and also some good Windows COM knowledge.

MSDN will be your friend a lot during development of this.

Rolf Kalbermatter


Message Edited by rolfk on 07-09-2008 08:35 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 21
(3,967 Views)