Staredit Network

Staredit Network -> Computers and Technical -> Show the contents of a Folder in a listbox
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-01 at 17:46:26
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.
Report, edit, etc...Posted by Vibrator on 2006-09-01 at 18:08:08
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
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-01 at 18:13:29
How would I use these? VB is very new to me, but I get the basics.
Report, edit, etc...Posted by Vibrator on 2006-09-01 at 18:17:11
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
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-01 at 19:24:45
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 =)
Report, edit, etc...Posted by Vibrator on 2006-09-02 at 00:26:33
Err.. do you still need help? tongue.gif

VB Express free to use
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-04 at 00:25:17
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?
Report, edit, etc...Posted by fatimid08 on 2006-09-04 at 08:30:59
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.
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-05 at 02:04:57
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.
Report, edit, etc...Posted by fatimid08 on 2006-09-05 at 06:46:27
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.
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-07 at 18:08:10
I tried what you suggested. It did not solve my problem =(
Report, edit, etc...Posted by Vibrator on 2006-09-08 at 19:21:24
You might not have compiled the control properly, make sure u compiled it to an ocx file
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-09-10 at 19:17:38
=o how do I do that? I remind you this is my first VB project.
Report, edit, etc...Posted by Vibrator on 2006-09-10 at 21:30:36
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.
Next Page (1)