Dim combo As ComboBox = CType(sender, ComboBox)
Dim r As Rectangle = e.Bounds
'backcolor
Using back As New SolidBrush(combo.BackColor)
e.Graphics.FillRectangle(back, r)
End Using
'text
r.Inflate(-1, -1)
Using fore As New SolidBrush(combo.ForeColor)
e.Graphics.DrawString(combo.GetItemText(combo.Items(e.Index)), e.Font, fore, r)
End Using
'border
If (e.State And DrawItemState.Selected) = DrawItemState.Selected Then
e.Graphics.DrawRectangle(Pens.Red, r)
End If
SendKeys.Send("{HOME}")