LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximize window

Solved!
Go to solution

@zou wrote:

 

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?

 


Here are a couple photos showing the transparent border around the edge of the window. You can see if you switch between them that the function does have an effect, but it is only enlarging the window slightly (look at the text at the bottom of the window). The background apps still show around the edge in both cases. I've attached the screenshots since the effect probably won't be visible if they are inlined.

 

EDIT: Here's the VI settings for the VI I'm trying to improve:

 

WindowAppearance.png

Download All
0 Kudos
Message 11 of 16
(842 Views)

It's the VI Setting: Allow user to resize window causing the problem.

Enable that in the VI Properties window, and then in your code, use Windows API to change the Windows Style from 17CF0000 to 17CE0000 to disable resize.

 

George Zou
Message 12 of 16
(813 Views)

@zou wrote:

It's the VI Setting: Allow user to resize window causing the problem.

Enable that in the VI Properties window, and then in your code, use Windows API to change the Windows Style from 17CF0000 to 17CE0000 to disable resize.

 


That's an interesting workaround! I had seen that enabling resize might resolve the problem but didn't want to do that for a maximized window. I'll have to give your solution a try, thanks!

0 Kudos
Message 13 of 16
(809 Views)

@iannicholson wrote:

@zou wrote:

It's the VI Setting: Allow user to resize window causing the problem.

Enable that in the VI Properties window, and then in your code, use Windows API to change the Windows Style from 17CF0000 to 17CE0000 to disable resize.

 


That's an interesting workaround! I had seen that enabling resize might resolve the problem but didn't want to do that for a maximized window. I'll have to give your solution a try, thanks!


So this gets most of the way to where I want to be. The one thing I still don't like is that I can drag the window from being maximized. I tried toggling several Window Styles and Extended Window Styles and I haven't found a combination that will stick the window maximized just like the LabVIEW native maximized state does, while eliminating the transparent border at the same time.

0 Kudos
Message 14 of 16
(783 Views)

@iannicholson wrote:


So this gets most of the way to where I want to be. The one thing I still don't like is that I can drag the window from being maximized. I tried toggling several Window Styles and Extended Window Styles and I haven't found a combination that will stick the window maximized just like the LabVIEW native maximized state does, while eliminating the transparent border at the same time.


You can disable Allow user to resize window in VI properties settings or using property node.

 

What's important is you need to set the Window Style to 0x17CF0000 first, so that FP will maximized properly;

then change the Window Style to 0x17CE0000 to disable the maximize box.

 

This works on my chassis.  User can not move the FP because FP is still maximized.

 

But if user minimize the FP, and then restore it, you have to set the Window Style again!

 

George Zou
Message 15 of 16
(773 Views)

Thank you for downgrading! You're solution was extremely helpful!

 

My application uses the actor framework and I could not get the `FindWindow` command to return successfully.

 

I swapped that for the `GetForegroundWindow` command and I think everything works as my boss wants.

 

This solves my immediate problem, but @zou, I disagree. This is a labview bug. Notepad does not ship with this style for a reason, the developer(s) had a choice and decided "no, this style does not work with my software".

 

My application contains several popable UI subpanels and it seems this workaround is required on every UI vi in project, time for some inheritance.

ui_actor_core.png

win10 Style Override.png

Message 16 of 16
(772 Views)