A good example of this is available here.
I am copying the code from the above example:
"You can set the color of individual elements in a ListBox using C # in your .NET WinForm by writing your own handler for the listbox DrawItem .
Set the DrawBox DrawMode property:
Add a standard ListBox to your .NET WinForm, then set its DrawMode property to OwnerDrawFixed , which causes the ListBox DrawItem event to fire.
Write a DrawItem event handler:
private void lstBox_DrawItem(object sender, _ System.Windows.Forms.DrawItemEventArgs e) {
In the InitializeComponent section, DrawItem handler to the DrawItem event:
this.lstBox.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lstBox_DrawItem);
Aamir source share