I'm trying to get it to work so that the operator can select ANY folder, but it looks like you have to set a RootFolder property to one of several
enumerated options, and if the folder that the user selects is not a subfolder of the chosen RootFolder, then tough luck.
And of course none of the enumerated options for the rootfolder property includes the filesystem root ....................
I've been fighting with it for three days and getting nowhere - has anyone else dealt with this ?
progressBox.AppendText("IO Error Writing To File.\n");
returnfalse;
}
}
This brings up a dialog box with its root folder set to "my computer"
If I just print the selectedPath to a messageBox it looks fine, but when I try and write it to file it doesn't work.
If I leave the rootFolder at the default (the desktop) and select a folder which exists on the desktop (is a desktop subfolder) then it works fine.
I fixed it yesterday. You're right - I assumed that with no path it would write the file to the same directory as where the exe is located, and usually it does, but selecting a different folder whth the folder dialog changes the default .................
Setting the path worked.
If there is an error while writting in your code the file will not close,make sure you close that file if there is an error. otherwise if it stays open youll just get more errors trying to open an already open file.
this is how i typically would do it.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.