title: How to change the background color of a ListBox Item when hovering?
body: <p>How do I change the Background Color of a ListBox Item when I hover over it?
  <br>I have overridden the DrawItem Event with this code:</p>
  
  <pre><code>private void DrawListBox(object sender, DrawItemEventArgs e)
  {
      e.DrawBackground();         
      Graphics g = e.Graphics;
      Brush brush = ((e.State &amp; DrawItemState.Selected) == DrawItemState.Selected) ?
          new SolidBrush(Color.FromArgb(52, 146, 204)) : new SolidBrush(e.BackColor);
      g.FillRectangle(brush, e.Bounds);
  
      e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), e.Font,
           new SolidBrush(e.ForeColor), e.Bounds, StringFormat.GenericDefault);
      e.DrawFocusRectangle();
  }
  </code></pre>
  
  <p>However, a ListBox does not have a Property which contains the hovered Item. There is also no Event like MouseEnterItem, MouseHoverItem Event, or anything similar on a ListBox to subscribe to.</p>
  
  <p>I did quite a lot of research, but all I found was a similar question on SO, which confused ListBox and ListView: <a href="https://stackoverflow.com/questions/12340135/hightlight-listbox-item-on-mouse-over-event">Hightlight Listbox item on mouse over event</a></p>