Writing WinForms code that scales to High DPI

In this post, I will try to collate different guidelines and pointers to readings that can help in building/fixing High DPI (HDPI) issues in WinForms

1. Automatic Scaling in Windows Forms

2. Creating a DPI aware application (MSDN documentation)

3. This post on SO has a documentation of some of the design guidelines – How to write WinForms code that auto-scales to system font and dpi settings? and this Creating a DPI-Aware Application

4. Take care of properly scaling Images – Make use of DpiHelper Class. For example, make use of LogicalToDeviceUnits to scale images properly for different DPIs

5. Try avoiding using the Designer. Use the built-in layout controls – specifically, the FlowLaypoutPanel and TableLayoutPanel

Most of the above points were helpful to me and should cover the most important things to keep in mind while working on HDPI. If you are starting fresh, you have various option like using WPF and building new Modern style UI on Windows 8 machines for which the framework handles the major things for you.