04-29-2009 06:22 PM
Hello,
I wonder if it is possible to drag and drop data from LabView to other Windows applications.
My idea is to drag Values or strings (Indicator values) from the front panel to an other Windows application.
May be that I have to manipulate the data types, but my question is drag and drop in this way in principle possible and how.
04-30-2009 02:22 AM - edited 04-30-2009 02:23 AM
Hi ruedi,
maybe with some changes this helps.
http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=338997#M338997
Mike
04-30-2009 07:18 PM
Hello MikeS81
the example is not really Drag and Drop.
Means, on the Drag event a file is copied to the desktop.
So not really data is dragged.
It seems to be difficult to drop text to e.g the desktop or wordpad.
Has no one a tip or workaround?
Thanks Ruedi
05-02-2009 03:24 AM
Hi ruedi,
that's what drag and drop is. It only visualize the functions behind. In your case you can use the clipboard to store your data and the paste event to get what you have stored.
Mike
05-02-2009 10:27 AM
Hello Mike,
OK. You are right. I have never seen it in this way. I thought that all the action has to be in one program. Like startdrag, paste the info to somewhere and then get a dropcomplete message and finished. In that way.
Pasting to the clipboard seemed to me not the same as pasting to e.g.. wordpad or VisualBasic, because to drop the info from the clipboard to e.g.. VisalBasic there is an additional action necessary. No dragging from LabView and just pasting in VisalBasic or wordpad is possible?
So maybe I have to think in Your way.
Thanks for Your help, although I am not totally happy but a bit farer on my way,
ruedi
05-02-2009 12:44 PM
ruedi wrote:
...Pasting to the clipboard seemed to me not the same as pasting to e.g.. wordpad or VisualBasic, because to drop the info from the clipboard to e.g.. VisalBasic there is an additional action necessary.
...
Hi ruedi,
yes there is an additional action, but you can send the paste command from your code. You can use the "SendMessage" function to get the data from the clipboard. No need to do it manually.
Mike
05-07-2009 01:43 PM
Hello Mike,
I have some trouble with the SendMessage.
What do I have to do to paste from the clipboard to another application?
Are there any examples?
E.g. drop something from LabView to the clipboard and the sendmesage to wordpad to paste it to the text.
Greeting Ruedi
05-08-2009 01:34 AM
Hi Ruedi,
this link should show how to copy text to the clipboard
and this one shows how you can send shortcuts to a window
http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=311290#M311290
Mike