LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to work with ActiveX Container on tab control?

Solved!
Go to solution

I am using LabVIEW 2020. I place an ActiveX container on the FP. I place an Adobe Acrobat Reader object in that container. I am using software from https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kGDwSAM&l=en-US. Everything works fine. I select a .PDF file and the file gets displayed. Also, the LoadFile boolean out from IAcroAXDocShim turns ON.

 

Then I drag the ActiveX container to one of the pages of a tab control. I select a .PDF file; the file does not get displayed and the LoadFile boolean out from IAcroAXDocShim does not turn ON.

 

Then I drag the ActiveX container back out of the tab control. I select a .PDF file; the file does not get displayed and the LoadFile boolean out from IAcroAXDocShim does not turn ON.

 

Does ActiveX not play well with tab control?

0 Kudos
Message 1 of 2
(1,066 Views)
Solution
Accepted by topic author Hamilton_Woods

And now, the solution!

 

I was creating a VI to demonstrate the problem, but the VI worked. Then I did the same thing in my target application, and it worked there as well.

 

Don't you wish you knew what I did? For the sake of other unsuspecting pioneers in the future (including me), I am posting what I did.

 

As previously, I created an ActiveX container on the FP. I placed an Adobe Acrobat Reader object in that container. Then I created a copy of the ActiveX container by selecting it, holding down CTL while dragging the ActiveX container onto the target tab control page. I referenced the copy of the ActiveX container that is on the tab control page. That solved the problem. I am attaching the test VI that shows the PDF viewer in action on the FP and on a tab control page.

 

As has been pointed out previously, loading a PDF file is a bit slow, but I can work with that.

0 Kudos
Message 2 of 2
(1,064 Views)