LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strategy to hide/minimize, restore windows

I just ran the code and I'm wondering, how does this work exactly?  The findWindow function is returning me 0 which is most likely not a valid window handle.  Can you point me in the right direction please?
Thank you

Yohan
0 Kudos
Message 21 of 27
(1,395 Views)
Hey DonRoth,

I just got it to work... problem was the windowName parameter.  You have to enter the exact string that shows up in the actual window name... hence, "anything.vi Front Panel".  The functionality of the child window is quite odd though.  When you maximize the child in the parent window, it covers up the parent menu bar... and also, when you maximize the child in the parent, it should keep being maximized if the parent is resized.  For example, you maximize the child in a non-maximized parent. You then maximize the parent and the child stays the the same size.  Anyways, I know you have played around with this more than me and I would appreciate your help.

Cheers

Yohan
0 Kudos
Message 22 of 27
(1,394 Views)
Well note first that you need the parent and child VI names (not window titles) as the strings.  You can modify for the titles as you wish.  For my purposes, I do not allow the user to change the child window sizes.  My need related to being able to have the parent window always stay as background and have the child windows always minimized and restored if the parent was minimized and restored.  My child windows always now stay withing the parent window as I need.
 
There were some early posts in this thread that dealt with more complex aspects.  See those.  I am interested in if your problems get solved.
 
Sincerely,
 
Don
0 Kudos
Message 23 of 27
(1,387 Views)
The menu bar and toolbar in LabVIEW are not standard window objects.  They are in the client area rather in the None-client area.
That's why they will be covered when you maximize a child window.
 
George Zou
 
George Zou
0 Kudos
Message 24 of 27
(1,379 Views)
ok, having understood that, is there a way to "bypass" that?

thanks
0 Kudos
Message 25 of 27
(1,364 Views)
There are 2 ways to get around this:
1. Create your own menu bar and tool bar (Windows standard objects) to replace NI's menu bar / tool bar;
2. Handle the child window max/min/resize... events yourself.
 
Either way, you need a lot Window programming knowledge.
 
 
George Zou
 
George Zou
0 Kudos
Message 26 of 27
(1,355 Views)

I was afraid that was the case... using anything that isn't native to LabVIEW tends to complicate things.  I guess the more logical approach would be to use subpanels or splitters.

Thanks for the help.

Yohan

0 Kudos
Message 27 of 27
(1,352 Views)