title: Windows Forms application on Windows 10 not scaling properly
body: <p>When running one of our Windows forms applications on Windows 10, the GUI looks pretty bad since the scaling seems to be messed up. 
  Here are some 1920x1080 screenshots (note the different sizes of the second pair):
  <a href="https://i.stack.imgur.com/3Xamk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3Xamk.png" alt="Win 10"></a></p>
  
  <p><a href="https://i.stack.imgur.com/jVdDr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jVdDr.png" alt="Win 7"></a></p>
  
  <p><a href="https://i.stack.imgur.com/X5wkg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/X5wkg.png" alt="Win 10"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ac8l0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ac8l0.png" alt="Win 7"></a></p>
  
  <p>The scaling option in the Windows 10 Display settings is set to 100% (so no extra scaling should be applied).
  Furthermore, the following code is executed at program start:</p>
  
  <pre><code>  static void Main()
      {
          if (Environment.OSVersion.Version.Major &gt;= 6) //Windows Vista and higher
              SetProcessDPIAware(); //disable DPI scaling (or something like that) to avoid scaling problems on Windows 10
  
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          Application.Run(Hauptmenue.Instance);
      }
  </code></pre>
  
  <p>This code block helps a little, since it looks a lot worse on Windows 10 without. 
  But this is not good enough...does anyone know how to "restore" the GUI to look exactly like on Windows 7 or 8?</p>