i i have a listbox and 1 button in my application

thing i want is when i click on some listbox item auto press that button

or

when i click on some item in list box it remove selected items from list box just with mouse click

Remove selected items :

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        For i As Integer = 0 To ListBox1.SelectedIndices.Count - 1
            ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
        Next
End Sub

Removed. I had a comment but Jx Man beat me to it;)

Removed. I had a comment but Jx Man beat me to it;)

i try given codes its solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.