07-23-2018 08:44 AM - edited 07-23-2018 09:09 AM
Hello everyone,
please explain this behaviour to me:
Why is there a gap on the left side? It is driving me nuts.
Update: Works as expected in windows 7. No gap on the left side.
Solved! Go to Solution.
07-23-2018 09:15 AM
Looks like a Windows issue. Different scheme.
07-23-2018 12:34 PM
Thanks for the reply! After digging around it really is a windows 10 theme issue. By editing the windows metrics in the registry you can get better results but it won't go completely away. Really annoying but not a labview bug.
07-24-2018 07:07 AM
Do you have links to the info you found about the theme issue, or the specific registry keys? Might be useful for the next person who comes across this Win10 issue.
07-24-2018 07:17 AM
The semi transparent drag border counts as window bound (8 pixels usually, IIRC). If you make the window non-resizable, you'll get better results.
07-24-2018 07:52 AM
Unfortunately even if i make it non resizable and set the registry values (\HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\BorderWidth ..\PaddedBorderWidth to 0 there is still a few pixel gap. But it really does help so thank you. I will have to put a few pixel correction into my program.
07-24-2018 08:20 AM
Instead of changing that registry value, you can (try to) read the border width. GetSystemMetrics does this, with SM_CXBORDER (5) wired to it.
Once you have that value, simply subtract it from the rectangle's left, add it to i's right coordinate.
Trying to make it 0 is a battle you'll probably lose. And as all windows are affected, it's not really nice to users.
I think making a window a child of another window will also remove the border. Maybe you can elaborate a bit on the use case?