09-23-2009 02:31 PM
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?
09-23-2009 02:45 PM - edited 09-23-2009 02:50 PM
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
09-23-2009 03:09 PM
09-24-2009 08:03 AM
Yep, your code truncates the Maximize. ( neat code by the way )
Try this edit. I get the restore button, and the code seems to work...
09-24-2009 08:40 AM