D
Dan Hinsley
I want to set the selectedpath in the folderbrowserdialog to a subdirectory
of my "My Music" folder, yet allow the user to traverse higher than that in
the directory if they want (in other words I don't want to set the root
folder to this My Music, I want to set it to My Computer). But when I use a
selected path that goes to My Documents or below, it doesn't accept it. Now
what I mean by doesn't accept, it doesn't return an error, it just doesn't
open up that node. When I try to drill down past my documents, it just
leaves me at the root. It works fine (selectedpath) up to the point of my
username (or other subdirs past my username other than my documents), then
after that, doesn't. I'm thinking that maybe it's some type of ACL issue,
but I can use directory.getdirectories to list the directories just fine.
The code is as follows:
Dim fb As FolderBrowserDialog = New FolderBrowserDialog
fb.RootFolder = SpecialFolder.MyComputer
fb.SelectedPath = "c:\documents and settings\danhi\my documents"
fb.ShowDialog()
This fails to expand any of the nodes in the display. If I replace the
selectedpath with something like "c:\documents and settings\danhi\start
menu" that works just fine.
Anyone have any idea what my problem is?
Dan
of my "My Music" folder, yet allow the user to traverse higher than that in
the directory if they want (in other words I don't want to set the root
folder to this My Music, I want to set it to My Computer). But when I use a
selected path that goes to My Documents or below, it doesn't accept it. Now
what I mean by doesn't accept, it doesn't return an error, it just doesn't
open up that node. When I try to drill down past my documents, it just
leaves me at the root. It works fine (selectedpath) up to the point of my
username (or other subdirs past my username other than my documents), then
after that, doesn't. I'm thinking that maybe it's some type of ACL issue,
but I can use directory.getdirectories to list the directories just fine.
The code is as follows:
Dim fb As FolderBrowserDialog = New FolderBrowserDialog
fb.RootFolder = SpecialFolder.MyComputer
fb.SelectedPath = "c:\documents and settings\danhi\my documents"
fb.ShowDialog()
This fails to expand any of the nodes in the display. If I replace the
selectedpath with something like "c:\documents and settings\danhi\start
menu" that works just fine.
Anyone have any idea what my problem is?
Dan