The Windows OS on my system is setup to respond to single clicks as opposed to double clicks. The DirListBox in my app only acts when double clicked, and only selects an item when single clicked. How do I change this so the DirListBox will act like my system and the rest of my app. I have a TextBox which can handle the select (single click) action. My code for this is such a mess (at least where DirListBox is concerned) I'm going to start over, but I would like some ideas before I try again.
Thanks.

How do I make DirListBox select a folder and display a new list of folders with a click?
Wolfgang Kamir
I was doing that, but for some reason it was not working at the time. However, once it started responding I was able find a number of bugs which I seem to have solved with the following code:
Public Sub New () ' This initializes DirListBox1
'DirListBox1.SelectedIndex defaults to a value of 9 because the subdirectory "Debug" is 10 levels deep, So:
DirListBoxSelectedIndexCount = 9
' Notice there's no dot in the line above, and the word count at the end
' The following line is automatically generated
InitializeComponent ()
' Include the following line to prevent an exception from being thrown.
DirListBoxSelectedIndexCount = 0 : DirListBox1.SelectedIndex = 0
End Sub
Private Sub DirListBox1.SelectedIndexChanged () 'Use the form designer to create this sub, then add the following:
' Is the selected index for DirListBox1 greater than the number of directory items in the path
If DirListBox1.SelectedIndex > DirListBoxSelectedIndexCount Then
DirListBoxSelectedIndexCount = DirListBoxSelectedIndexCount + 1 : FileListBox1.Path = DirListBox1.SelectedItem
' Or is it less than the count of subdirectories in the path
ElseIf DirListBox1.SelectedIndex < DirListBoxSelectedIndexCount Then
Dim x As Integer
' Get the number of parent directories to go up minus one (to prevent overshooting target [DirListBox indexing is zero based])
For x = 0 to DirListBoxSelectedIndexCount - DirListBox1.SelectedIndex - 1
' ".." tells the OS to go to the parent directory : Keep track of the number of subdirectories in path
FileListBox1.Path = ".." : DirListBoxSelectedIndexCount = DirListBoxSelectedIndexCount - 1
Next
End If
End Sub
Private Sub FileListBox1_PathChanged () 'Use the form designer to create this sub, then add the following:
' Force the DirListBox to update so it is syncronized with the displayed files
DirListBox1.Path = FileListBox1.Path
End Sub
' There is no End Class because this code is not stand alone.
' Obviously (as exemplified in the New sub) this code is hard wired for "Debug" as the 10th directory in the path.
khawaja