Create a New Project in VB.net. Drag a ImageList control and combo box control from tool box and place on form. Now go to properties of the image list and using property collection ADD pictures. Now write code on form load event of the form and some other events as follows:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim items(Me.ImageList1.Images.Count - 1) As String
For i As Int32 = 0 To Me.ImageList1.Images.Count - 1
items(i) = "Item " & i.ToString
Next
Me.ComboBox1.Items.AddRange(items)
Me.ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
Me.ComboBox1.DrawMode = DrawMode.OwnerDrawVariable
Me.ComboBox1.ItemHeight = Me.ImageList1.ImageSize.Height
Me.ComboBox1.Width = Me.ImageList1.ImageSize.Width + 18
Me.ComboBox1.MaxDropDownItems = Me.ImageList1.Images.Count
End Sub
Private Sub ComboBox1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ComboBox1.DrawItem
If e.Index <> -1 Then
e.Graphics.DrawImage(Me.ImageList1.Images(e.Index) _
,e.Bounds.Left, e.Bounds.Top)
End If
Private Sub ComboBox1_MeasureItem(ByVal sender As Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles ComboBox1.MeasureItem
e.ItemHeight = Me.ImageList1.ImageSize.Height
e.ItemWidth = Me.ImageList1.ImageSize.Width
Posted on 12/5/2006 3:34:56 PM by Bobby
Posted on 2/6/2007 6:59:21 AM by Mukesh
Posted on 12/17/2007 3:32:14 AM by Deepthy
Posted on 12/18/2007 1:19:14 AM by Bhoopa
Posted on 2/11/2008 5:59:40 AM by Rejeesh
Posted on 3/31/2008 5:42:15 AM by sumi
Posted on 11/8/2008 8:05:59 AM by codefox
Posted on 2/3/2009 12:10:41 PM by Vrushank
Posted on 1/27/2010 4:10:24 AM by DreamClown
Posted on 2/2/2010 3:05:45 PM by Rizwan
Posted on 2/17/2010 11:46:51 PM by jimi