The runtime for Windows Forms, Microsoft’s UI framework for building Windows desktop applications, was spruced up with the recent release of .NET 6.0, although high-DPI and scaling issues remain to be resolved for the application.
In a bulletin on Windows Forms improvements published November 16, Microsoft said it had been working through the “high DPI space” trying to get Windows Forms applications to properly support PerMonitorV2 mode, a DPI awareness mode that allows applications to immediately render correctly whenever the DPI changes.
PerMonitorV2 support has been a challenging undertaking and “sadly, we couldn’t achieve as much as we hoped,” Igor Velikorossov, software engineer for Windows Forms at Microsoft, said. But progress has been made in the .NET 6 release, with support for creating controls in the same DPI awareness as the application, and correct scaling of
ContainerControl and MDI child windows in PerMonitorV2 mode in most scenarios.
Microsoft cited a number of other changes for Windows Forms in .NET 6.0, which was released on November 8:
ApplyApplicationDefaults, to define application-wide settings in the typical Visual Basic way. Also, designer support for the default font configured via MSBuild properties is coming in the near future.
global usingdirectives, file-scoped namespaces, and nullable reference types.
Control.BeginInvoke()methods that take
Func<T>and allow writing of more modern and more concise code.