I want to be able to show the files (certain file type) of a folder in a listbox. The folder can be specified by the user. Any Ideas on how I can accomplish this? Any Ideas on how I can make a folder Tree? Codes would be very helpful.
It would be much easier to use VB.NET for something like this (for the folder tree anyway). There is a drivelistbox, dirlistbox (folders) and filelistbox objects. filelistbox has a property called pattern which u can set to *.exe or whatever extentsion u want
How would I use these? VB is very new to me, but I get the basics.
I wish i had VB6 with me so I could test this but I have used them to create a dialog box before so I'll try and help
CODE
Private Sub Drive1_Change ()
Dir1.Path = Drive1.Drive ' Set directory path.
End Sub
Private Sub Dir1_Change ()
File1.Path = Dir1.Path ' Set file path.
End Sub
That will make it so whenever the drive box changes drives the folder box will update with new folders and whenever the folder changes the filelist will change to the files in that folder
The code you gave me did not work. but it made me find the filelistbox which i never knew existed =p. Now I have a populated list of files and you can select them and what not. Lets say I add a command button below the filelistbox that says "Open". Now when you click it, what code is used to get the path of the selected file in the filelistbox?
EDIT: nevermind the code you gave me works =)
Err.. do you still need help?
VB Express free to use
My VB project usees a User Control Named AppDoc.
Whenever I make an executable version of the project it works fine on this computer, but on any other computer I send the exe to I try to run it and it says it failed to run AppDoc . and to make sure I am using the Current version of . Any idea why this happens? Do i need to somehow include the user control? I tried just putting the user control in the same folder but I still get the same Error. Any Ideas?
Are you sure the other computer you are sending the application to has the Visual Basic 6 Runtimes installed? If not, I think SEN has a download link somewhere in the database, or go to Microsoft's website and look for it.
I want the program to be able to run even if the computer does not have visual basic. It is an executable is it not? I'm trying to make a program.
It's not the whole program the others need to have, it's just the runtime, just as you need to run Starforge or SCMDraft.
I tried what you suggested. It did not solve my problem =(
You might not have compiled the control properly, make sure u compiled it to an ocx file
=o how do I do that? I remind you this is my first VB project.
Err wait, ignore what i said before. Unfortunatly compiling it to an exe doesnt help much. It is still looking for the control from the same place which you added it.