title: WinForms app uses low-quality title bar icon on 16-bit display
body: <p>On displays with 16-bit color depth (including Remote Desktop sessions set to 16-bit color), Windows Forms applications use a low-color-depth version of the assigned title-bar icon (<code>Form.Icon</code>). WPF applications and Windows Explorer, however, use the 24-bit color depth, if it exists.</p>
  
  <p>I first saw this in a Windows Forms application I'm currently working on. The icon I was using had 4-bit, 24-bit, and 32-bit variants defined.  On 16-bit displays, Windows Forms was using the ugly 4-bit version in the title bar instead of the nice-looking 24- or 32-bit version.</p>
  
  <p>To test and illustrate the behavior, I created a test icon with obviously different designs for each size and color format. I included 4-bit, 8-bit, 24-bit, and 32-bit variants.</p>
  
  <p>Here are the results on both 32-bit and 16-bit displays:</p>
  
  <h2>On 32-bit displays, all is well:</h2>
  
  <p><strong>Windows Explorer:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/eDurb.png" alt="Windows Explorer, 32-bit display"></p>
  
  <p><strong>WPF Application:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/VEush.png" alt="WPF Application, 32-bit display"></p>
  
  <p><strong>Windows Forms Application:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/yAMSR.png" alt="Windows Forms Application, 32-bit display"></p>
  
  <h2>On 16-bit displays, Windows Forms displays a lower-color-depth variant of the icon than does WPF or Windows Explorer:</h2>
  
  <p><strong>Windows Explorer:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/dVVmx.png" alt="Windows Explorer, 16-bit display"></p>
  
  <p><strong>WPF Application:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/pU7gz.png" alt="WPF Application, 16-bit display"></p>
  
  <p><strong>Windows Forms Application:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/wDIZO.png" alt="Windows Forms Application, 16-bit display"></p>
  
  <p>On 16-bit displays, Windows Explorer and WPF use the 24-bit format, but Windows Forms does not.  In this case, it used the 8-bit format. My real application icon did not have an 8-bit variant (but I'm going to make one now!), so Windows Forms used the 4-bit variant.</p>
  
  <p><strong>How can I make my Windows Forms application display the 24-bit version of an icon in its title bar on a 16-bit display?</strong></p>