07-21-2015 04:49 PM
Hi,
I'm building an labview application using Labview 14.0. I set the minimum size of my main VI window and removed the scroll bars. But people could still increase the size of the window and see my hidden objects. How to prevent that? Is there any way to LOCK the size of a front panel so the size is unchangeable?
Your help will be greatly appreciated!
Thanks very much!
07-21-2015 05:02 PM
07-21-2015 05:08 PM
Well, YES! VI Properties>>Windows size
sets those size properties
VI Properties> Window appeance>>Customize! has a checkbox for "Allow user to resize window" have you pressed Ctrl+I before? No disgrace if you haven't but, some of those options are useful![]()
07-22-2015 08:44 AM
Mike and Jeff,
It's good to know that Ctrl+I can get to VI Properties directly. 🙂 Thank you all for your reply! I'm sorry I forgot to say that I meant when the application stopped running. When it's running, there is no problem. But when it's not running, that unchecked box doesn't prevent user resizing the window of application.How do we lock the window size when it's not running?
07-22-2015 08:51 AM - edited 07-22-2015 09:01 AM
I don't think you can? When it's not running it's in 'development mode' so you can resize it as you like. Why do you want to do this?
You can always:
- Set the front panel size / reset the origin position when the VI runs
- Have your application run as an executable and exit (close the front panel) when it stops
07-22-2015 08:59 AM - edited 07-22-2015 09:04 AM
You could also select "Top Level VI" from the "Window Apperance" category and it sets it up pretty decently (including disabling resize in Run Mode - plus some other stuff). I sometimes use that for a template and then click customize to change things that I don't like about it. (Don't worry, customizing only sets up a custom look - it doesn't change the "Top Level VI" settings itself.)
But as Sam says, if you're trying to do this in Edit Mode, I don't think there's a way.
07-22-2015 09:13 AM
07-22-2015 09:23 AM
Sam, Bill and Dennis,
It's an .exe and it will stop running at certain conditions as designed on purpose -- so certian instructions will only be displayed once when the program runs. As long as the program keeps running, they can test boards seamlessly without reading the instructions again and again. It's not in edit mode since it's a built excecutible. Right?
Regards.
07-22-2015 09:25 AM
@Dennis_Knutson wrote:
You don't care that the code itself can be changed?
For that you can lock the VI with a password ![]()
07-22-2015 09:29 AM
If it's running as an executable, you should hide/remove the 'run' arrow. When your top level VI finishes, your program should exit and the process should leave memory.
It sounds like you need to rethink how your application works as an executable so that it goes 'idle' when the test finishes rather than the VI finishing execution completely - then you'll have a button that allows you to run another test rather than the restarting the VI.