How to get ListBox Selected Text in VB.NET Winforms

Here is a simple snippet to get the selected text of the list box in

Make use of the SelectedIndexChanged Event of the listbox and add the following code in it



Private Sub lstBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstBox.SelectedIndexChanged
Me.lblCategory.Text = Me.lstBox.GetItemText(Me.lstBox.SelectedItem)
End Sub