creating custom highlight/selection colors with windows from controls in C# and .NET
Posted on 2009-05-08
I am trying to create custom highlight colors for menus and listboxes. So as the selection movs my colors are used to highlight instead of the system colors.
Thank you for any help you can provide.
I tried this but it all it does is over cover up the highlighted element with th enew color, cannot ready the text anymore:
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
int i = listBox1.SelectedIndex;
Rectangle rc = listBox1.GetItemRectangle(i);
SolidBrush myBrush = new SolidBrush(Color.Beige);
Graphics g = Graphics.FromHwnd(listBox1.Handle);