LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

@rolfk wrote:

wiebe@CARYA wrote:

@zou wrote:

Use Windows APIs to remove this style at runtime.

Something like this:

Remove Annoying 1 Pixel Border From Maximizad Windows.png

 

@zou wrote:

Only need to do this once at the beginning of your program.


Well, you'd need to do this for each VI you want this.

 

And if you close (not hide or minimize) the FP, you'd probably need to do this again (as you get a new hWnd).

 

I tried to change this in the LV window's class, but the style of a LVDChild returns 0, so the style is probably applied after VI's FP's are created. So, changing the class's style doesn't result in anything (or I did something wrong, of course). 

 

You could change the VI.NativeWindow method with a FindWindow\FindWindowEx:

Find VI Windows.png

But LV titles can be tricky!


And you have just discovered the tip of the iceberg why this is NOT a 10 minute fix. 😀

 

Windows styles are complicated, involved, interact with each other in difficult to evaluate ways and this even changes between Windows versions. The WS_EX_CLIENTEDGE flag affects how the border is drawn for windows who have one of the other border type flags. For borderless windows it should not have any effect, expect that it seems to somehow offset everything by 1 pixel.

So you may fix the issue of this one pixel white border with your 10 minute fix, but create half a dozen other problems in much less harmless areas.


Could be.

 

They did add the flag without considering the consequences...

 

Not sure if that proves your point or the opposite 😂.

0 Kudos
Message 21 of 24
(562 Views)

wiebe@CARYA wrote:


Could be.

 

They did add the flag without considering the consequences...

 

Not sure if that proves your point or the opposite 😂.


As explained in my edit to the post, if they did add it at some point explicitly it was for some very good reason, not just to add an extra commit message to the source code control. 🙂

What that reason was is likely never going to be clear. The people who could see that and were sometimes willing to disclose such things to us mere mortals have all gone.

Rolf Kalbermatter
My Blog
Message 22 of 24
(557 Views)

@rolfk wrote:

wiebe@CARYA wrote:


Could be.

 

They did add the flag without considering the consequences...

 

Not sure if that proves your point or the opposite 😂.


As explained in my edit to the post, if they did add it at some point explicitly it was for some very good reason, not just to add an extra commit message to the source code control. 🙂

What that reason was is likely never going to be clear. The people who could see that and were sometimes willing to disclose such things to us mere mortals have all gone.


The style seems to be mostly relevant for MDI windows.

 

I wouldn't be surprised if they added it in LV8, when the tried a MDI project approach. Or maybe sub panels.

 

All I know is that the result adds to LabVIEW's sloppy look and feel (I got used to).

0 Kudos
Message 23 of 24
(531 Views)

Thanks everyone, this thread has been very helpful.  I've found that if a VI is already maximized, then once you apply the style you need to resize, then remaximize it again for it to have the affect I want.  I also added code to see if the current style already has the fix, and if it does then there is no need to resize and remaximize.  As others have mentioned this could be wrapped up in a callback pretty nicely.

Message 24 of 24
(491 Views)