Looks like a Windows issue. Different scheme.
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.
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.
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.
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?