title: Windows form combobox custom form color
body: <p>I have been playing around with customizing the WinForm combobox...So far I have the following:</p>
  
  <p><img src="https://i.stack.imgur.com/fcWmi.png" alt="enter image description here"></p>
  
  <p>Using this code:</p>
  
  <pre><code>public class ComboBoxWithBorder : ComboBox
  {
      private Color _borderColor = Color.Black;
      private ButtonBorderStyle _borderStyle = ButtonBorderStyle.Solid;
      private static int WM_PAINT = 0x000F;
  
      protected override void WndProc(ref Message m)
      {
          base.WndProc(ref m);
  
          if (m.Msg == WM_PAINT)
          {
              Graphics g = Graphics.FromHwnd(Handle);
              Rectangle bounds = new Rectangle(0, 0, Width, Height);
              ControlPaint.DrawBorder(g, bounds, _borderColor, _borderStyle);
          }
      }
  
      [Category("Appearance")]
      public Color BorderColor
      {
          get { return _borderColor; }
          set
          {
              _borderColor = value;
              Invalidate(); // causes control to be redrawn
          }
      }
  
      [Category("Appearance")]
      public ButtonBorderStyle BorderStyle
      {
          get { return _borderStyle; }
          set
          {
              _borderStyle = value;
              Invalidate();
          }
      }
  }
  </code></pre>
  
  <p>However, I am trying to achieve something similar to this:</p>
  
  <p><img src="https://i.stack.imgur.com/tAyng.png" alt="enter image description here"></p>
  
  <p>Is it possible to change the background color of the white dropdown box to a darker color? </p>
  
  <hr>
  
  <p>Is it possible to change the dropdown list border from white to a different color?</p>
  
  <p><img src="https://i.stack.imgur.com/hvB1U.png" alt="enter image description here"></p>