cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

[bug] get clipboard image fails in executable

Solved!
Go to solution

Re: [bug] get clipboard image fails in executable

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
(1,382 Views)
Highlighted
Solution
Accepted by topic author TCPlomp
08-27-2015 04:09 PM

Re: [bug] get clipboard image fails in executable

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
(1,369 Views)

Re: [bug] get clipboard image fails in executable


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
(1,354 Views)

Re: [bug] get clipboard image fails in executable

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
(1,316 Views)

Re: [bug] get clipboard image fails in executable


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
(1,311 Views)

Re: [bug] get clipboard image fails in executable

Just stop. You are not contributing anything with your off-topic comments.
0 Kudos
Message 26 of 37
(1,302 Views)

Re: [bug] get clipboard image fails in executable

Hi Ton,

 

Yes, the CAR#422317 is filed for it.

 

Kind regards,

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

Re: [bug] get clipboard image fails in executable


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
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 28 of 37
(1,286 Views)

Re: [bug] get clipboard image fails in executable

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
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--www.colinzhang.net

0 Kudos
Message 29 of 37
(1,211 Views)

Re: [bug] get clipboard image fails in executable

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
(1,164 Views)