LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximize window

Solved!
Go to solution

How do I truly maximize a labVIEW window?

 

I am attempting to maximize the front panel of a VI when called, but there is a 2 pixel border between the edge of the window and the edges of the screen. (Actor UI event helper loop with init invoke node FP.Open maximize)

maximize_failure.PNG

 

Front panel does not extend to the edge of the screen. Also 2 pixels above task bar (not pictured here). Windows do sit at the top of the screen

main_panel.PNG

 

This happens on all labVIEW windows (even the block diagrams).

block_diagram_not_maximized.PNG

What is going on? How do I truly maximize a window?

 

LabVIEW 20.0.1f1 (64bit)

Windows 10 22H2

0 Kudos
Message 1 of 16
(1,904 Views)
0 Kudos
Message 2 of 16
(1,869 Views)

@BertMcMahan wrote:

That's the neat part... you don't!

 

https://forums.ni.com/t5/LabVIEW/Single-pixel-1px-border-missing-on-LabVIEW-windows-in-Windows-10/td...

 

 

😞


Thank you, I thought I was loosing my mind.

 

Is this a windows 10 only bug? My deployment machine is still running windows 7.

 

I understand that I may be a bit anal, but maximize should maximize.

0 Kudos
Message 3 of 16
(1,843 Views)

This is not a LabVIEW bug.

See my post to:

Single pixel (1px) border missing on LabVIEW windows in Windows 10

 

George Zou
0 Kudos
Message 4 of 16
(1,832 Views)

@zou wrote:

This is not a LabVIEW bug.

See my post to:

Single pixel (1px) border missing on LabVIEW windows in Windows 10

 


Oh, interesting. I didn't make it to the end of that thread.

 

Where can I find resources on calling this api (64-bit) through labVIEW? I want to try this out.

0 Kudos
Message 5 of 16
(1,823 Views)

remove_WS_EX_CLIENTEDGE.png

 

Here's an attempt at a VI snippet to remove the WS_EX_CLIENTEDGE window style from whatever Window Title you enter in the string to the left. (my first time posting a snippet so I hope it works)

 

Unfortunately this only partially resolves the problem for me, as it seems to correct the "1px" border in the mentioned thread, but doesn't remove the several (8 perhaps?) border that also exists around my maximized VI. Still hunting for a full solution

Message 6 of 16
(1,810 Views)

Could you share as a VI? Or downgrade the snippet?

 

I am currently running labVIEW 2020 and am struggling to set up the calls to user32.dll

 

Many thanks

0 Kudos
Message 7 of 16
(1,796 Views)

If you are not familiar with Windows API, download this:

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

 

It's a good starting point.

 

You can find document here:

https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

 

 

George Zou
0 Kudos
Message 8 of 16
(1,750 Views)

@iannicholson wrote:

remove_WS_EX_CLIENTEDGE.png

 

Here's an attempt at a VI snippet to remove the WS_EX_CLIENTEDGE window style from whatever Window Title you enter in the string to the left. (my first time posting a snippet so I hope it works)

 

Unfortunately this only partially resolves the problem for me, as it seems to correct the "1px" border in the mentioned thread, but doesn't remove the several (8 perhaps?) border that also exists around my maximized VI. Still hunting for a full solution


Your VI looks like a good one.

Could you show us a picture what part of the border still has problem?  And what is your VI properties setting?

 

George Zou
Message 9 of 16
(1,732 Views)
Solution
Accepted by topic author ianzur

@ianzur wrote:

Could you share as a VI? Or downgrade the snippet?

 

I am currently running labVIEW 2020 and am struggling to set up the calls to user32.dll

 

Many thanks


Here's a VI saved all the way back to LV 8.6.

0 Kudos
Message 10 of 16
(1,727 Views)