Hi,

I'm trying to write a program in VB.NET which requires that a user be
able to choose a directory on their local hard disk. In VB6, this
could be accomplished with the "DirListBox" in conjunction with the
"DriveListBox" and that worked very well.

This has no direct counterpart in VB.NET, although it is possible to
use VB6 controls, so I tried to use these same controls with mixed
results. They do not appear to have the same behavior.

In VB6, my code looked like this:

Private Sub dirSelect_Change()
' The user selected a new directory. Tell the file list.
filSelect.Path = dirSelect.Path
End Sub

Private Sub drvSelect_Change()
' User selected a new drive. Tell the directory list.
dirSelect.Path = drvSelect.Drive
Exit Sub

In VB.NET, the code looks like this:

Private Sub dirSelect_SelectedIndexChanged_1
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles dirSelect.SelectedIndexChanged
txtSeedDir.Text = dirSelect.SelectedItem
End Sub

Private Sub drvSelect_SelectedIndexChanged_1
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles drvSelect.SelectedIndexChanged
dirSelect.Path = drvSelect.Drive
txtSeedDir.Text = drvSelect.Drive & "\"
End Sub

This actually works, except that it gives ONLY the name of the
directory when I want the entire PATH.

Am I missing something or does VB.NET make this very difficult to do?

I am not sure this is the best newsgroup to ask, and I rarely use
newsgroups, so any help or suggestions would be appreciated. Please
cc your response to "[email protected]" if you would. Thank you in
advance,

Dobe
www.eskimo.com/~dobe/
Punny Name Archive