LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front panel window jumping up and down (LabView 2010 SP 1)

Solved!
Go to solution

I have an annoying bug with dynamically opening and running a VI.

 

The VI below is compiled to a DLL:

 

front.png

 

With this I open a secondary VI to display results. That VI is called repeatedly in a loop. It works fine, but I was annoyed with the flickering of the menu bar and toolbar. Therefore I added the "FP.ShowMenuBar" and "TB.Visible" to hide those. This causes the front panel window to jump up and down on my screen. Is this a known bug (I presume it is) and is there a work-around?

 

Another minor annoyance is that opening the front panel, closing it, and then opening it again causes the front panel to be opened in the background, and I have to manually move it to the foreground. I thought it could be remedied by adding "FP.IsFrontmost", but it does nothing. 

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 1 of 4
(2,765 Views)
Solution
Accepted by topic author LarsM

OK, I made the VI reentrant and added the "Prepare for reentrant run" option to the "Open VI Reference" box. That made the VI open as a clone and stopped the flickering of menu and toolbar.

 

As an added bonus the CPU load dropped significantly. (But I don't see why.)

 

Haven't figured out the front panel positioning annoyance yet, though.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 2 of 4
(2,708 Views)

Why would you repeatedly open a VI in a loop?

 

Why would compile that code into a .dll?

0 Kudos
Message 3 of 4
(2,702 Views)

I open it once, then I call it repeatedly, using this VI:

 

front2.png

 

(I'm not using a global variable for the reference anymore, I send the reference in the function call.)

 

I compile this to a DLL because that's the only way (that I know of) I can open and execute a VI from an external programme. 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 4 of 4
(2,700 Views)