LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Active X Containers become invisible when Vi called second time

I am working on this project that has a lot of panel tricks.

The top level GUI has ours and the customer's logo on it. So every GUI VI called from there gets pasted into the sub-panel on the main VI. (This happens with the Insert VI method of the main panel.) GUI VIs that have active X containers work fine the first time you call them. The second time the Active X containers are invisible. The label still shows, but nothing else.

I am working in Windows XP with LabVIEW 7.1 We have two different Active X controls we are using. A spread sheet control from Farpoint (Ver 6.) and Microsoft's Tree View control.

Any pointers are appreciated.
0 Kudos
Message 1 of 4
(2,624 Views)
It's hard to tell what's happening without more details. Can you post a stripped-down version of your app? I modified the subpanel.llb\viewer.vi sample to use an ActiveX control and switching back and forth worked fine. Of course, that example aborts and reloads the VI in the subpanel each time you switch, so I reworked it to keep the VI Ref around and just reinsert it each time, and it still worked fine for me. I was using the Microsoft Web Browser control.
George Erwin-Grotsky
National Instruments
LabVIEW Research & Development
0 Kudos
Message 2 of 4
(2,614 Views)
Here is an example of what i am talking about. One of my co-workers threw it together, and it demonstrates the bug I am talking about.

Instructions:
1) Run main.vi.
2) In the subpanel, a VI will popup with two controls and two buttons. Click the "Popup" button.
3) Another VI with some controls and buttons pops up. Click ok.
4). Now you're back at the first VI. Click popup again.
5) The second VI appears, but the tree control is gone.
0 Kudos
Message 3 of 4
(2,596 Views)
Hi typhoidmary,

I was able to reproduce the behavior that you are describing by using the example you attached. I tried launching your two dynamically called VIs from the shipping subpanel example called "viewer.vi". When I did that, the ActiveX container always stayed visible. This makes me think that the cause of your issue is partly due to the queue functionality and the way you are handling the subpanel.

I noticed that the chances for the ActiveX container to stay on the front panel increased if I waited a few seconds between switching between the dynamic VIs.

Since you are using Global Variables there might be a risk of race conditions. To further troubleshoot, you should try adding breaks different places in your code to overcome possible race conditions.

Let me know what you find, thanks.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(2,578 Views)