LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy a picture to the clipboard.

Hallo,

I'm writing a program that allows the user to take data measurements and display them in a window. The output of this window is easy to put on the clipboard for the user to select the image and rigth-click and select "copy data".

For scaling reasons however I want to let the user be able to put the picture in a larger/smaller size on the clipboard and preverbly without the mouse button functions since allowing pop-up items allows the user to change all kind of data on the front panel (for instance: emptying an array).

In short: Is it possible to put a picture programatically on the clipboard without even displaying this picture on the front panel, just like saving a picture to a file.

Thanx
in advance for answers,

Marcel kalf.
0 Kudos
Message 1 of 5
(4,096 Views)
There is an example program in the Developer Zone that programmatically copies the contents of a string control to the clipboard. This can be found at:

http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&3B1B0B401B12F80D8625683C006F1253&cat=71359FBAD517F4CB862567E0007B6F6E
0 Kudos
Message 2 of 5
(4,096 Views)
Thanks for the comment, and I've tried this vi. The problem however is that for a picture (during run-time) the CTRL-C option doesn't work (while the VI is inactive it actually works). Furhermore I want to be able to put the picture on the clipbord without the user ever seeing it in the program.
0 Kudos
Message 5 of 5
(4,096 Views)
Marcel Kalf wrote:

> Hallo,
>
> I'm writing a program that allows the user to take data measurements
> and display them in a window. The output of this window is easy to put
> on the clipboard for the user to select the image and rigth-click and
> select "copy data".
>
> For scaling reasons however I want to let the user be able to put the
> picture in a larger/smaller size on the clipboard and preverbly
> without the mouse button functions since allowing pop-up items allows
> the user to change all kind of data on the front panel (for instance:
> emptying an array).
>
> In short: Is it possible to put a picture programatically on the
> clipboard without even displaying this picture on the front panel,
> just like saving a picture to a file.
>
> Thanx in advance for answ
ers,
>
> Marcel kalf.

Download "CopytoClipboard" at:

http://george-zou.sinacity.com/gtool51.htm

It can capture a rectangular area on the screen, and save it as
a bitmap onto clipboard.
0 Kudos
Message 3 of 5
(4,096 Views)
Thanx for the comment AA, I've tried that option. The problem of this option however is that the actual picture has to be visual on the screen to be captured, something I didn't want to do (altough I can put it off the boundaries of the screen) and the .BMP output format. If I just click "copy data" from the pop-up menu the output is vectorised and thus easier to scale in the program the user uses to display/process.

But this tool is indeed close to what I need.
0 Kudos
Message 4 of 5
(4,096 Views)