c# form set auto scale

C#
Form.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
Source

Also in C#: