Need help with a vb6 file list box showing to contents of a directory.
Ok, so i have a level editor for my game, Written in Visual Basic 6, and in the editor you need to choose a floor texture for your level. Now, let me show you the way the directorys are set up before explaning the problem.
Now, what i want to do is have the list box in my editor, show only the textures in the devils arithmetic textures folder. Now, i could have it show C:\Windows\Program Files\Devils Arithmetic\Devils Arithmetic\Textures, but not everyone may have their hard drive called C:\ and\or may not have the game installed to this directory. So, how do i get a list box to show the Devils Arithmetic Textures, regardless of where the game is installed.
I would really appreciate some help with this.
[Edited by - Brandon F on June 14, 2005 11:37:31 PM]
i tried that. for the file list box in the menu of the actual game for showing the maps to choose from, i have
file1.path = app.path & "\maps"
but i need to be able to go back a directory, into two more, and get the list from there.
file1.path = app.path & "\maps"
but i need to be able to go back a directory, into two more, and get the list from there.
Going back can be done by adding .. (two dots) in your path.
So C:\Windows\Program Files\Devils Arithmetic\Devils Arithmetic\Textures\..\..\X
points to: C:\Windows\Program Files\Devils Arithmetic\X
Cheers
So C:\Windows\Program Files\Devils Arithmetic\Devils Arithmetic\Textures\..\..\X
points to: C:\Windows\Program Files\Devils Arithmetic\X
Cheers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement