I have done some win32 programming with another version of basic. In the past, I have used an environment variable and then concatenated a string to get the filepath (string to plug into file info structure) that I desire. This technique does not work here. I know I am getting some kind of enumeration but I don't know what to do about it.
The example or project on page 273 uses the line shown below for the "RootFolder" of the FolderBrowserDialog which I changed while I was fooling around with the code to see how I could use it for my own programs. That is what I like about this book, you can twiddle with the code and watch the debugger while reading the "How it works" to see how things . . . um . . . work.
rem original line in book below, works fine
.RootFolder = Environment.SpecialFolder.MyComputer
rem changed to: (this does not work)
Dim mystr As String
mystr = Environment.SpecialFolder.Windows
mystr = mystr + "system32"
rem this works:
.RootFolder = Environment.SpecialFolder.Windows
rem but I want a folder below this.
Why won't my code change work?
Somehow I get an integer instead of a string. How can I use the specialfolder method to get to system32 or anywhere I want? I might want to use relative addressing from some common folder like "windows" or the user "documents" folder as a starting point.