LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MAximizing doesn't maximize

I noticed the same behaviour in LabVIEW 2015 under Windows 10/11.

 

You can try setting the Front Panel bounds to a fixed value in runtime. You'll have to watch out for multi monitor setups though.

Edit: be sure to leave space for the Window title bar and scroll bars if any

 

snip.png

0 Kudos
Message 11 of 24
(278 Views)

Use FP.PanelBounds to change the front panel size will make the front panel movable, and no longer maximized.

George Zou
0 Kudos
Message 12 of 24
(271 Views)

Down converted to 2017.

 

George Zou
0 Kudos
Message 13 of 24
(256 Views)

It works, but in my environment (LV2017 with a since long downloaded Winutil library, win10) the implicit conversion of FP.NativeWindow to a HWND is not valid and makes the vi broken, so I had to pass FP.Title to MoveWindow.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 14 of 24
(244 Views)

Something wrong with it.
FP.NativeWindow is a Number but the Move Window.vi want a FP refnum

gepponline_0-1729577856302.png

 

However I make it work using front panel title to the other input, BUT this solution need me to know the resolution of the screen and make some operations on it.

For example, on my laptop I have a screen resoution of 1366x768 (728 excluding taskbar), and to fit the whole workspace I need to set size to 1384x737 and position left to -9.
So, hoping 9px is teh same value for all screen, I should make this operation:
Width=workspace dimension+(9*2)

Height=workspace dimension+9

This give me the result I need..but why? It should be a simple Maximize setting that has always work on other OS 😞

 

0 Kudos
Message 15 of 24
(241 Views)

So this could be a solution using Windows utility tool

gepponline_0-1729580977368.png

 

And this one using only LabVIEW

gepponline_0-1729583080831.png

 

But in LV version the windows still movable And i don't want to...

0 Kudos
Message 16 of 24
(235 Views)

> This give me the result I need..but why?
> It should be a simple Maximize setting that has always work on other OS
When a window maximized, the edge of the window is not changed or invisible, it's outside the windows workarea.  This is the normal.

 

> But in LV version the windows still movable And i don't want to...
Not only movable, it also no longer maximized.  Take a look the window maximum box.
Also windows' style changed from 17CA0000 to 16CA0000.

 

 

George Zou
0 Kudos
Message 17 of 24
(218 Views)

@pincpanter wrote:

It works, but in my environment (LV2017 with a since long downloaded Winutil library, win10) the implicit conversion of FP.NativeWindow to a HWND is not valid and makes the vi broken, so I had to pass FP.Title to MoveWindow.


I used Rolf's version of the library.  You can download it from:

https://forums.ni.com/t5/LabVIEW/How-to-run-an-exe-as-a-window-inside-a-VI/m-p/4096356/highlight/tru...

 

His version does not use NI wrap dll, calls Windows API directly.

 

George Zou
0 Kudos
Message 18 of 24
(215 Views)

@zou  ha scritto:

> This give me the result I need..but why?
> It should be a simple Maximize setting that has always work on other OS
When a window maximized, the edge of the window is not changed or invisible, it's outside the windows workarea.  This is the normal.

 


In WInXP it was not so.
The window is maximized, it fill the whole screen ,the edges are visible and the window is not movable.
The problem is with win10. For some unknown reason the LV maximize process is not the same as the win32.dll
 

0 Kudos
Message 19 of 24
(202 Views)

@gepponline wrote:

The problem is with win10. For some unknown reason the LV maximize process is not the same as the win32.dll


This is just LabVIEW.  Not Windows 10.

 

By the way, the 10-pixel is not a random number, it the difference between FP.WinBounds and FP.PanelBounds.

 

George Zou
0 Kudos
Message 20 of 24
(197 Views)