Bit of help

tiasyd1

Member
HELP:sign0104:
I want my program to open a folder and list the items in it so i can select what i need from this folder to use .
What box do i use is it a txt box or a combo box .This box will have jpegs or gifs i want to select it will be a folder called outlook.
Any help would be greatful
 

derez

Expert
Licensed User
Longtime User
start by using filesearch, which makes an arraylist of all the files in the selected directory.
Then copy the items to a list box which enables you to select an item from a displayed list.
Look at Erel's GPS4PPC program, he makes a list of the available ports and select one of them ( called "lstPorts" there).
The launching of the specific file can be done by Shell command with the name of the file, if there is a program that can open this file.
 

tiasyd1

Member
Still stuck

Can someone please write a sample that i can open a folder and display in a text box
so i can test and work from thanks
:sign0104:
 

ExcludeReality

Active Member
Licensed User
A simple file viewer

I wrote a simple file viewer to show you how it works. It will list all files at specified path and runs them when you select them from a listbox
 

Attachments

  • FileLauncher.sbp
    868 bytes · Views: 182

derez

Expert
Licensed User
Longtime User
Well done :)
I added open dialog to enable the selection of directory, and separated the file name from the dir name to show only the file name without the path.
It works on the device also, but may take a minute to collect all the files.
 

Attachments

  • files_in_dir.sbp
    1.3 KB · Views: 170
Last edited:

ExcludeReality

Active Member
Licensed User
Great improvements. But i would prefer not to use an open-dialog. It is made for opening files, Wich means you can't open an empty folder because there are no files inside
 
Top