Jump to content
News about the LabVIEW Wiki! Read more... ×
Sign in to follow this  
Neil Pate

FP.PanelBounds misbehaving in exe

Recommended Posts

I have created some code that is supposed to store a VIs FP.PanelBounds to disk and them restore them later so that window positions are persisted between runs of the executable. Everything works perfectly in the IDE, but in an executable I get strange behaviour. The most common thing that goes wrong is that the window is vertically shifted down by some very noticeable number of pixels, approximately equal to my Windows taskbar (by eyeball measurement). Sometimes it does work though, and it seems to be only on the first load of the executable that the position is set incorrectly. While the exe is running I can close windows and restore them in the correct place (but perhaps then my VI is still in memory or something)

I have probed around and the values being persisted to disk and read back are correct, the bug seems to be in the setting of the FP.PanelBounds property.

I suspected it could something in Windows (like the restoring animation) interfering with LabVIEW as the window "appears" but I have disabled this and still no difference.

Am I doing something silly here? There seem to be lots of different properties for setting window bounds and stuff like this (see https://decibel.ni.com/content/docs/DOC-22385) so perhaps I am doing this a dumb way? I am pretty sure I used this technique on Win XP and LabVIEW 8.6 and it worked perfectly. At the moment using Win 10 and LV2015SP1.




Edited by Neil Pate
Added URL

Share this post

Link to post
Share on other sites

Make sure the VI is running before setting its position/size. This effect usually occurs when you use an external window sizer/positioner to the VI that you want to position (rather than on its own diagram) because the FP opens but the menus, title bar and sliders are visible (depending of FP settings) before they are hidden when running.

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

By using this site, you agree to our Terms of Use.