Results 1 to 6 of 6

Thread: [RESOLVED] List Box and Mouse Click Event While missing Selected item

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    17

    Resolved [RESOLVED] List Box and Mouse Click Event While missing Selected item

    Ok, I have a listbox that has a double click event on it. If you strike the items in the list the program works perfectly without a problem, but if you hit white space, the program blows up.
    The frmOpen has a rich text box that uses the data from transfername on it to call forth a name from another system.

    The question I have, Is there a way to show the system that there is nothing being clicked? I have tried the selecteditem = 0 and -1 and the selectedindex = 0 and -1 nothing happened. I'm kind of lost on this one. Trying to make this work for my new job.
    Code:
     Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.MouseDoubleClick
            Dim transfername As String = ListBox1.SelectedItem.ToString()
            frmOpen.Show()
            frmOpen.filename = transfername
        End Sub
    VB.net 2010 Professional Edition.
    Last edited by davebold370; Jun 15th, 2013 at 11:28 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width