LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send control image programmatically to clipboard


@tst wrote:
 
We used some free VIs from Rolf Kalbermatter to do this in the Code Capture Tool. The tool itself is released in 7.0 format, but the VIs will also work on older versions if back saved.

Yes, this was useful for me. I was banging my head against the problem until it occured to me that there must be a VI I could pull from the CCT to handle the saving of a LV Image to clipboard. The format is device-independant bitmap, which is just fine.
 The VI is named "Copy Image to Clipboard DLL_CCT.vi".

copy control image to clipboard (Windows only).png
 

 

Ryan R.

____
Ryan R.
R&D
0 Kudos
Message 11 of 16
(1,178 Views)

image ref.png

 

That should work for any control (or indicator) to capture the image and dump it to clipboard.  It doesn't call the Windows API at all, or rely on any external DLLs.

0 Kudos
Message 12 of 16
(1,173 Views)

so I am using some very similar code but it won't function in a sub VI unless the front panel is opened. It works every time if the same code is in the top level VI, or if the front panel of the sub VI is open, but almost never works in a sub VI. High CPU load seems to decrease the likelihood of it working in a sub. 

 

Anyone want to harbor a guess as to why?

 

code.png

 

 

0 Kudos
Message 13 of 16
(1,143 Views)

Anyone want to harbor a guess as to why?


 

Sure

Capture.PNG


"Should be" isn't "Is" -Jay
Message 14 of 16
(1,140 Views)

Thanks. I knew it was indicative of some fundamental lack of knowledge on my part but if you can't reveal your ignorance, no one will bother to alleviate you of it. 

Message 15 of 16
(1,137 Views)

@BowenM wrote:

image ref.png

 

That should work for any control (or indicator) to capture the image and dump it to clipboard.  It doesn't call the Windows API at all, or rely on any external DLLs.


However, this is NOT a true VECTOR image, but a EMF wrapped BMP file.

Get Image method returns PIXELs.

 

 

George Zou
0 Kudos
Message 16 of 16
(1,125 Views)