2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by abhay1234
0

Add list box to form and add entries("strings")

try this

Public Class Form1

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Select Case ListBox1.SelectedIndex
            Case 1
                MsgBox(ListBox1.SelectedItem)
            Case 2
                MsgBox(ListBox1.SelectedItem)



        End Select

    End Sub
End Class

oops i used .net

0

Add list box to form and add entries("strings")

try this

Public Class Form1

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Select Case ListBox1.SelectedIndex
            Case 1
                MsgBox(ListBox1.SelectedItem)
            Case 2
                MsgBox(ListBox1.SelectedItem)



        End Select

    End Sub
End Class

oops i used .net

but i think u can use it in java as well..i am not sure

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.