ImLearningDotNet
Member
Hello all,
I am trying to display the contents of my comboBoxList in a messageBox. I cant seem to grasp on how to do this. I know I have to use a loop but, well this is what I have came up with so far. Any help would be greatly appreciated!
I am trying to display the contents of my comboBoxList in a messageBox. I cant seem to grasp on how to do this. I know I have to use a loop but, well this is what I have came up with so far. Any help would be greatly appreciated!
VB.NET:
Private Sub exampleListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exampleListToolStripMenuItem.Click
Dim messageString As String
Dim indexInteger As Integer
Dim maximumInteger As Integer
maximumInteger = Me.exampleComboBox.Items.Count - 1
messageString = "Movies currently in list: "
MessageBox.Show(messageString, "Movie categories" _
& me.exampleComboBox.
For indexInteger = 0 To maximumInteger
Me.exampleComboBox.Items(indexInteger)
Next indexInteger
End Sub
Last edited by a moderator: