LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

maximize child without covering parent's menu

Dear friends,


I am trying to create two vi's, being one the parent and the other the child. I am doing this by using the user32.dll and the "call library function node" tool.

The problem appears when I want to maximize the child vi because it covers the menu of the parent vi. I would like to know if there is a way to confine the maximize-area of the child vi within the parent vi.


thanking in advance,
CJMV, Chile
0 Kudos
Message 1 of 4
(2,797 Views)

Hi crimolvic,

      If your question is: how to use the user32.dll(?), that's a Microsoft product! Smiley Wink

LabVIEW can probably do what you need - maybe using a tab control or SubPanel.

Why do you think you need user32.dll?

Cheers

 

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 2 of 4
(2,780 Views)


@crimolvic wrote:
Dear friends,


I am trying to create two vi's, being one the parent and the other the child. I am doing this by using the user32.dll and the "call library function node" tool.

The problem appears when I want to maximize the child vi because it covers the menu of the parent vi. I would like to know if there is a way to confine the maximize-area of the child vi within the parent vi.


By using user32.dll you do certain assumptions that have not to be right for all applications. LabVIEW menus just as about everything else in LabVIEW except the window frame itself are not standard Windows objects. As far as Windows is concerned, everything in the LabVIEW window except the frame and title bar is client area. By maximizing a child window Windows will resize it to the area of the client area of the parent. Crying about these facts is possible but won't help and changing this is absolutely no option since LabVIEW was built that way to allow support of multiple platforms including MacOS, Solaris/XWindow, Linux/XWindows and in fact other OSes eventhough some of them never were released.

You could do even more user32.dll magic by first retrieving the parent handle, getting its client area size, subtracting some constant for the menu (which will have problems for VIs that do not have menus as well as potential height differences for different Windows Theme Styles) and then size the child to that.

Better would be to try to come up with other means. If you use LabVIEW >= 7 subpanels would be the way to go I think.

Rolf Kalbermatter

Message Edited by rolfk on 04-04-2006 11:40 AM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 4
(2,779 Views)
>You could do even more user32.dll magic by first retrieving the parent handle, getting its client area size, subtracting some constant for the menu (which will have problems for VIs that do not
>have menus as well as potential height differences for different Windows Theme Styles) and then size the child to that.
G Toolbox =>Set Child does this for you, and when you dragging the child window by titlebar, or sizing child window, it's cover menu bar, toolbar, or scroll bar.
 

>Better would be to try to come up with other means. If you use LabVIEW >= 7 subpanels would be the way to go I think.
 
Subpanel has its limits.  For emaxple, no working with event structure correctly.
 
 
George Zou
George Zou
0 Kudos
Message 4 of 4
(2,753 Views)