954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mouse clicking

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

honeybee2090
Light Poster
28 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

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
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

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

Reverend Jim
Posting Shark
Moderator
1,167 posts since Aug 2010
Reputation Points: 253
Solved Threads: 159
 
Removed. I had a comment but Jx Man beat me to it;)

i try given codes its solved

honeybee2090
Light Poster
28 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You