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

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

Solved!
Go to solution

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

 

refer to below picture, it is used to call WinAPI for screen shot, and then save to PNG file. This Vi run normally on the development flatform, but it is failed when build .exe application file. The error dialog pop-up "illegal path string, OS", but it is clear that the path is correct. Note: run the same PC with Win XP.

 

 

screen shot.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




iTestGroup

0 Kudos
Message 1 of 10
(2,256 Views)

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

Can you attach the screenshot of error dialog that pops up...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 10
(2,242 Views)

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

Thanks for your reply. Yes, but it is Chinese. I also put the dialog location here. 

 

Error.PNG   Dialog.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




iTestGroup

0 Kudos
Message 3 of 10
(2,240 Views)

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

When i put the dialog before Write PNG File, no error output. 

 

dialog1.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




iTestGroup

0 Kudos
Message 4 of 10
(2,238 Views)
Solution
Accepted by topic author colinzhang
08-27-2015 04:09 PM

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

Update:

i have found the reason but no solution. In fact, the Clipboard.Get Image is not working when build exe application. But this is the private Invoke Node, can't get any support from NI.

It seems to become to the public Invoke Node on LabVIEW 2012 version, who can help to verify it on LV2012 version? Thanks very much.

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




iTestGroup

0 Kudos
Message 5 of 10
(2,199 Views)

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

I have lv2012 and it does not work here either.

Has anyone found a solution?

0 Kudos
Message 6 of 10
(2,085 Views)

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

No, it seems a bug that has reported to NI R&D. 

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




iTestGroup

0 Kudos
Message 7 of 10
(2,078 Views)

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

oooh, Yes, I change to use .Net reference to copy the screenshot. Please visit my blog site for solution.

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




iTestGroup

0 Kudos
Message 8 of 10
(2,076 Views)

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

Thx man =)

0 Kudos
Message 9 of 10
(2,073 Views)

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

 

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.

 

Refer to below code, 

 

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




iTestGroup

0 Kudos
Message 10 of 10
(1,983 Views)