Ok, number 1 is possible. Here's a little example I knocked up, hope it helps:
rem Produced by Robert the Robot
rem 23-8-07
CD "C:\Program Files\Dark Basic Software\Dark Basic\media\sounds\explode"
Dim Filename$(255)
perform checklist for files
rem Output filename of each item in checklist(max 255)
for t=1 to checklist quantity()
rem try changing this or extending it to allow mp3s or midis.
rem Remember, though, that midis require you to use Laod Music later on.
If Lower$(Right$(checklist string$(t), 4)) = ".wav"
rem Either load and play the file directly...
` Load Sound checklist string$(t), t
` Play Sound t
` Sleep 2000
rem ...or store the filename in an array
Filename$(t) = checklist string$(t)
endif
next t
rem Load music from array
For t = 1 to 255
if Filename$(t) <> ""
Load Sound Filename$(t), t
rem Display filename
Print Filename$(t)
Play sound t
rem This just pauses the program while the sound plays.
rem otherwise, every sound gets played at once.
rem Mind you, that can be interesting...
sleep 2000
endif
Next T
This will read the first 255 files in a folder that you can specify using the CD command. It prints the currently playing sound's , filename to screen.
I'm afraid I can't help on your second question, I've not really experimented with windowed applications in DB.
On our way 'ome, on our way 'ome...