LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiled executable does not open in maximized window

Solved!
Go to solution

I have attached a JPG showing the VI Properties that pertain to Window size.  Despite the fact that I have indicated in Run-Time Position - Position:  Maximized.  The compiled executable does not open in a maximized window.

 

Even stranger, if I take the shortcut for the program and change it's properties (on the target machine) to Open Maximized, it still doesn't open maximized.

 

I have had this behavior with every compiled executable for a couple of years using versions of LabVIEW 8, 2010, 2011 and currently 2011 SP1.  Both the compiling machine and the target machine are Windows XP.

 

Is there any explanation for this behavior?  Any way to correct it?

0 Kudos
Message 1 of 8
(4,848 Views)

I find that the executable does expand to a maximized window as soon as the program is run.

 

This is not what one would expect.  Why doesn't it open maximized?

0 Kudos
Message 2 of 8
(4,847 Views)

I am concerned that this behavior confuses my naive users who expect to see a maximized window as soon as they double-click on the icon.

0 Kudos
Message 3 of 8
(4,846 Views)
Solution
Accepted by topic author wildcatherder
Unless you have a specific reason not to, you could set the vi execution properties to Run when Opened and that should maximize the window. http://zone.ni.com/reference/en-XX/help/371361H-01/lvdialog/execution/

Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 4 of 8
(4,843 Views)

You also have "maintain proportions of window for different monitor resolutions" set.  If you maximize a given window, it might force the proportions to change from whatever the current values are.  If you want to maintain proportions, it might not be able to enlarge enough in both directions to fill the whole screen.  Think of a situation where you have a window proportioned for a 4:3 ratio screen, or a 16:9 ratio screen, and now the newest monitors seem to be 16:10.  Scaling something up from a 16:9 ratio is not going to be able to fill a 16:10 screen.

 

I think saying you want to maintain proportions is overriding anything else you may want to try to do with the window size.

Message 5 of 8
(4,840 Views)

I think Ravens Fan is correct. The aspect ratio appears to take precedence over the window position.

 

You can set a property manually in your code to maximize the window.

 

http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/vi_fp_winstate/

 

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 6 of 8
(4,822 Views)

The window does maximize once I run the executable.  The problem seems to be that LabVIEW sees no reason to deal with with windows size until the program actually runs, which is contrary to my experience with Windows programs.  It also appears to override or ignore the Windows shortcut setting for OPEN (not run) maximized.

 

The only solution appears to be "run when opened" which is contrary to desired operation because it requires another interface button to actually start doing anything, otherwise possible hazards could result from operation which begin when the program runs.

 

I will accept PhillipsBrooks solution as a workaround which begs the basic question about why not OPEN maximized..  None of the settings appears to make any difference until the program is actually run.

 

Thanks to those who took the trouble to respond.

0 Kudos
Message 7 of 8
(4,806 Views)

I'd argue that LabVIEW isn't supposed to be like other Windows programs.  Any windows programs you are thinking of are ones that are actually running as soon as they start.  LabVIEW is a program development environment, so the settings you are working with are ones intended for when the program you write is actually running as an application, and don't and shouldn't when LabVIEW is within the develpment environment.

 

If this behavior is too confusing for a user of your application, then it isn't being written correctly.  A user of your application should only see it when it is actually running, they shouldn't be working with it when your program is not running and in the development environment.  The development environment is only for the programmer (i.e. you), not for the "user", (i.e. whoever you want to use your program).

Message 8 of 8
(4,802 Views)