LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write PNG file failed when build exe, but run normally on the development platform

Solved!
Go to solution

Thanks for Colin's solutions (http://www.colinzhang.net/2013/09/worklog-how-to-get-image-from-clipboard.html ). Perfectly solved the problem. 

 

Can save clipboard picture as PNG format in executable file made by LV 2017.

0 Kudos
Message 11 of 14
(665 Views)
Great to help you on this case.
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!
0 Kudos
Message 12 of 14
(647 Views)

To Capture just the Active Window requires two keys to be pressed. ALT + PRINT SCREEN. The example mimics both keys being pressed but only releases the ALT key , leaving the PRINT SCREEN key pressed which then 'confuses' the .NET action (for me it also left most of the keyboard inactive).

SOLUTION: before releasing the ALT key insert another call to the kbd-event function to release the PRINT SCREEN key

arg1    (0x2A - PRINT SCREEN)

arg2    0

arg3    2    (Release Key)

arg4    0

Alt-PRINT SCREEN now works for me in both environments.

 

0 Kudos
Message 13 of 14
(517 Views)

To Capture just the Active Window requires two keys to be pressed. ALT + PRINT SCREEN. The example mimics both keys being pressed but only releases the ALT key , leaving the PRINT SCREEN key pressed which then 'confuses' the .NET action (for me it also left most of the keyboard inactive).

SOLUTION: before releasing the ALT key insert another call to the kbd-event function to release the PRINT SCREEN key

arg1    (0x2A - PRINT SCREEN)

arg2    0

arg3    2    (Release Key)

arg4    0

Alt-PRINT SCREEN now works for me in both environments.

 

0 Kudos
Message 14 of 14
(517 Views)