LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[bug] get clipboard image fails in executable

Solved!
Go to solution

What wrong with my question  I know how clipboard works. I just want to ask if he is using LV to store image to clipboard and read back then instead of writing image convert it into array and write and read back. 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 21 of 37
(4,070 Views)
Solution
Accepted by TCPlomp

Hi Ton,

 

Thank you for letting us know about this bug. It is actually already entered in our system for correction.

 

The recommanded workaround is the .NET code that Colin has posted.

 

It should work properly for you. The Clipboard class is a static class so no need for a constructor (which is why you have a null reference). Just place a .NET Invoke Node and select the "System.Windows.Forms.Clipboard" class.

To have it working, you need also to use the User Interface as Preferred Execution System (FIle>>VI Properties>>Execution).

 

Kind regards,

Cédric | NI Belgium
Message 22 of 37
(4,057 Views)

@Ranjeet_Singh wrote:

What wrong with my question  I know how clipboard works. I just want to ask if he is using LV to store image to clipboard and read back then instead of writing image convert it into array and write and read back. 



I'm glad you understand how the clipboard works.  But you are making statements and adding things to the conversation that Ton never said he was trying to do.

 

Where did he say he was "using LV to store image to the clipboard."?  He didn't.  He is trying to GET the image from the clipboard into LabVIEW.  He never said where the images on the clipboard were coming from.

0 Kudos
Message 23 of 37
(4,042 Views)

Hello Cédric, 

 

do yo know a CAR?

 

And yes changing the execution system fixes works around this issue.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 24 of 37
(4,004 Views)

@RavensFan wrote:
I'm glad you understand how the clipboard works.  But you are making statements and adding things to the conversation that Ton never said he was trying to do.

 Where did he say he was "using LV to store image to the clipboard."?  He didn't.  He is trying to GET the image from the clipboard into LabVIEW.  He never said where the images on the clipboard were coming from.


 

That is what I also told him in my previous replies, Instead of image, convert it into array and store the array and read same but when presenting to user convert it into image.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 25 of 37
(3,999 Views)
Just stop. You are not contributing anything with your off-topic comments.
0 Kudos
Message 26 of 37
(3,988 Views)

Hi Ton,

 

Yes, the CAR#422317 is filed for it.

 

Kind regards,

Cédric | NI Belgium
0 Kudos
Message 27 of 37
(3,981 Views)

@tst wrote:

@TCPlomp wrote:

 

My current workaround is using greenshots with a fixed config that stores the print-screen action in a pre-defined place.


You could probably also use the VIs Rolf linked to in the LAVA thread. As far as I know, they should work (although they probably need to be tested on newer versions of Windows to make sure).


They would need to be revised and upgraded to work for 64 bit LabVIEW. That would mean LabVIEW 2009 and newer only though as there was no way to configure Call Library Node pointers in a way that they behave in either LabVIEW bitness correctly before that.

Rolf Kalbermatter
My Blog
0 Kudos
Message 28 of 37
(3,972 Views)

Hi all the repliers,

 

I find another solution that get the clipboard image. Hope it is helpful for next follower.

 

Use the IMAQ ClipboardToImage.vi under vision module, it can get the image successfully, but not verify it after build executable file.

 

Copy the clipboard to image.png

 

 

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
Message 29 of 37
(3,897 Views)

Hi,

I had the same problem. Solution of cedhoc works! .NET Invoke Node Get Image work correctly also as executable.

 

Thanks for the help!

 

Simyfren

0 Kudos
Message 30 of 37
(3,850 Views)