LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use FP.Get Image with Active X control

 I have an ActiveX control on the front panel of a VI.  One report we have uses FP.get image to take a 'snapshot'   For some reason, the ActiveX control is no longer visible.  Its as if the control was invisible for the image grab.
 
Same behavior as if you pressed <ALT><PrintScreen>  which works fine BTW.
 
I am certain that this worked in the past and I am think that perhaps a windows update has changed something.
 
I am able to grab an image of the control by itself but not on the front panel.
 
I see this with 7.1.1 and 8.2.1.
 
Anybody have a suggestion?
 
Jim West
Summitek Instruments
Message 1 of 9
(3,462 Views)

I believe ActiveX containers are actually seperate windows (e.g. you would get a Mouse Leave event for the VI if you enter one) and so are not handled by this method (although they should be and you should file a bug report).

As for workarounds, how about adding an array of control references to the subVI which captures the image and the capture the image of each control in that array seperately and integrate it into the final image using its Position and Size properties? I know it's not ideal, but it should probably work.


___________________
Try to take over the world!
0 Kudos
Message 2 of 9
(3,445 Views)
It has been like this for as long as I know (LV5?).


Why not substitude only the activex control's image?


Regards,


Wiebe.
0 Kudos
Message 3 of 9
(3,437 Views)

I was certain that this was working correctly earlier this year but I'm getting old and maybe I can't remember.  I think the proof of it is that I couldn't find a archived sample report.

Thank you for the suggestions.  I decided to put a picture control directly behind and the same size as the control.  Whenever I use the Get Image, I take a jpg of the activeX control and stuff it into the picture.  Then when the activeX control 'disappears' the picture is showing what it looked like the instant before.

Jim West

Message 4 of 9
(3,434 Views)
Hey, here is an example that I did in LabVIEW 8.2.1.  I saved the front panel with both an invoke node (print front panel) and a html report.  Both parts work for me.  Does the example work for you?
 
Let me know!
 
Thanks!
Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
Download All
0 Kudos
Message 5 of 9
(3,425 Views)
It might depend on the ActiceX control, and how it handles repaint messages from the OS.


I know for sure that some AX controls had this problem, I'm not sure if they all had this problem.


Regards,


Wiebe.
0 Kudos
Message 6 of 9
(3,418 Views)

Jim wrote


 I decided to put a picture control directly behind and the same size as the control.  Whenever I use the Get Image, I take a jpg of the activeX control and stuff it into the picture.  Then when the activeX control 'disappears' the picture is showing what it looked like the instant before.


What a great work-around!

I love it.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 9
(3,414 Views)
A clever solution indeed.

___________________
Try to take over the world!
0 Kudos
Message 8 of 9
(3,400 Views)

Hi,

 

the suggested sollutions do not work when trying to make an image of an ActiveX with a pdf file inside it.

 

But, for pdf files, take a look at https://visualstudiogallery.msdn.microsoft.com/b590710c-efe6-4667-842e-2a592ce000cc

 

This SDK can convert a pdf file to an image file (the free version only the first 10 pages) and it works from within LabView (as .NET dll)

 

Smiley Happy

0 Kudos
Message 9 of 9
(2,576 Views)