LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Window doesn't recognize being maximized

I have a VI with picture controls that need to maintain their squareness, so as  the window is changing I am overwriting it with sizes that maintain the proportions.  It all works decently until I start maximizing the window.  The maximize box always shows instead of the restore boxes, and part of the code doesn't execute properly.  Once I maximize twice the screen updates to how I want.  Obviously, this is undesired.

 

I understand my description isn't probably the best, so I've attached the VI.

 

First try resizing it by grabbing the borders.  You'll notice that the picture controls resize along with the window.  Additionally, the picture in the picture control changes size.

 

Now try maximizing the window.  You'll see the controls get bigger, but the actual picture does not change size.  (And the restore button is not there)  Maximize the window again.  The picture updates, but the restore is still not there.  

 

My guess is the restore doesn't show up because the window isn't really maximized, because I made it smaller to maintain proportions.  I guess I can live with this.  But, any idea why my picture doesn't update on the first maximize?

 

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 1 of 5
(2,935 Views)

Well I figured out why it wasn't performing like I expected.  My logic was wrong.  Seems reasonable.

 

 

Was I right about this part though?

My guess is the restore doesn't show up because the window isn't really maximized, because I made it smaller to maintain proportions.

 

My updated VI is attached

Message Edited by elset191 on 09-23-2009 02:50 PM
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 2 of 5
(2,930 Views)
Well, I found a way to test it using the Front Panel state property.  I was right.  Hmm...Guess I'll have to live with it unless someone knows how to trump the function of that button.
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 3 of 5
(2,914 Views)

Yep, your code truncates the Maximize.  ( neat code by the way Smiley Happy )

 

Try this edit. I get the restore button, and the code seems to work...

1.gif

Richard






Message 4 of 5
(2,898 Views)
I had programmed this same workaround when I was playing around yesterday.  It leaves a lot of blank space at the bottom, which isn't so bad, but I was hoping there was a more consistent way.  Thanks
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 5 of 5
(2,894 Views)