GetSystemMetrics() returns different results for .NET 4.5 & .NET 4.0

So, it’s actually a by-design behavior, and if someone has similar issues, here is the code which always outputs the same result: const int CXFRAME = 0x20; const int CYFRAME = 0x21; const int CXPADDEDBORDER = 92; var dx = GetSystemMetrics(CXFRAME); var dy = GetSystemMetrics(CYFRAME); var d = GetSystemMetrics(CXPADDEDBORDER); dx += d; dy += d; … Read more