Click here to Skip to main content
16,004,686 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to let a listbox display a listItem Collection? Pin
KaKa'6-Mar-06 21:36
KaKa'6-Mar-06 21:36 
AnswerRe: How to let a listbox display a listItem Collection? Pin
Bulbul Bhuwania6-Mar-06 23:56
Bulbul Bhuwania6-Mar-06 23:56 
GeneralRe: How to let a listbox display a listItem Collection? Pin
KaKa'7-Mar-06 13:42
KaKa'7-Mar-06 13:42 
QuestionCode Behind Button Which are included at run time... Pin
Mr. Arfan Qadir6-Mar-06 21:36
Mr. Arfan Qadir6-Mar-06 21:36 
AnswerRe: Code Behind Button Which are included at run time... Pin
Vasudevan Deepak Kumar6-Mar-06 23:22
Vasudevan Deepak Kumar6-Mar-06 23:22 
AnswerRe: Code Behind Button Which are included at run time... Pin
Dave Kreskowiak7-Mar-06 4:53
mveDave Kreskowiak7-Mar-06 4:53 
Questionsending email via Exchange Pin
jcrussell6-Mar-06 20:44
jcrussell6-Mar-06 20:44 
QuestionImage combobox help Pin
Troy Lundin6-Mar-06 19:18
Troy Lundin6-Mar-06 19:18 
Hi.

I am new to this site. I found an example of an image combobox by Alon Ronen. The code is 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 + 200
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
End Sub

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
End Sub

I would ask the author about this code but I cannot figure out how to contact the author. My question is how I would add text to this combobox. I want a box with images and a line of text as a kind of descriptor. Any ideas?
AnswerRe: Image combobox help Pin
Dave Kreskowiak7-Mar-06 4:50
mveDave Kreskowiak7-Mar-06 4:50 
QuestionNeed Help With Threading Issue... Pin
mayhem_rules6-Mar-06 18:35
mayhem_rules6-Mar-06 18:35 
AnswerRe: Need Help With Threading Issue... Pin
RichardBerry7-Mar-06 4:05
RichardBerry7-Mar-06 4:05 
QuestionPlay audio problem( more then 2 audio) Pin
campbells6-Mar-06 16:37
campbells6-Mar-06 16:37 
AnswerRe: Play audio problem( more then 2 audio) Pin
Vasudevan Deepak Kumar6-Mar-06 23:20
Vasudevan Deepak Kumar6-Mar-06 23:20 
GeneralRe: Play audio problem( more then 2 audio) Pin
campbells6-Mar-06 23:35
campbells6-Mar-06 23:35 
GeneralRe: Play audio problem( more then 2 audio) Pin
Dave Kreskowiak7-Mar-06 4:37
mveDave Kreskowiak7-Mar-06 4:37 
GeneralRe: Play audio problem( more then 2 audio) Pin
campbells7-Mar-06 6:03
campbells7-Mar-06 6:03 
GeneralRe: Play audio problem( more then 2 audio) Pin
Dave Kreskowiak7-Mar-06 11:59
mveDave Kreskowiak7-Mar-06 11:59 
GeneralRe: Play audio problem( more then 2 audio) Pin
campbells7-Mar-06 17:33
campbells7-Mar-06 17:33 
GeneralRe: Play audio problem( more then 2 audio) Pin
campbells7-Mar-06 17:45
campbells7-Mar-06 17:45 
GeneralRe: Play audio problem( more then 2 audio) Pin
Dave Kreskowiak8-Mar-06 0:20
mveDave Kreskowiak8-Mar-06 0:20 
GeneralRe: Play audio problem( more then 2 audio) Pin
Danilo Castro de Souza18-May-11 6:39
Danilo Castro de Souza18-May-11 6:39 
GeneralRe: Play audio problem( more then 2 audio) Pin
Dave Kreskowiak18-May-11 6:56
mveDave Kreskowiak18-May-11 6:56 
QuestionNew problem :) Positioning ComboBox Pin
FeRtoll6-Mar-06 14:36
FeRtoll6-Mar-06 14:36 
AnswerRe: New problem :) Positioning ComboBox Pin
PremalathaP6-Mar-06 18:44
PremalathaP6-Mar-06 18:44 
QuestionRe: New problem :) Positioning ComboBox Pin
FeRtoll6-Mar-06 19:22
FeRtoll6-Mar-06 19:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.