|
-
Feb 9th, 2003, 02:59 PM
#1
Thread Starter
Member
filelistbox: dam simple problem
hey guys,
im using a fileListBox to get the names of files that exists in a folder....
the screw up is that i dont want it to show the extention...
for example....
Run to you.mp3
Crawling.mp3
i only want to show...
Run to you
Crawling
any ideas....???
i dont want to ue the replace string function on the list on the FileListBox....
i want ot directly get the names in the box without the extensions
-
Feb 9th, 2003, 04:12 PM
#2
Sorry, using a FileListbox really limits you in many things. Try a regular listbox...
VB Code:
Private Sub Form_Load()
Call ListFiles("C:\*.*")
End Sub
Private Sub ListFiles(ByVal Path As String)
Dim s As String
s = Dir$(Path)
While (Len(s) > 0)
If InStr(1, s, ".") Then
s = Left$(s, InStr(1, s, ".") - 1)
End If
Call List1.AddItem(s)
s = Dir$
Wend
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Feb 10th, 2003, 04:37 PM
#3
Thread Starter
Member
thanx man...your idea was great....... thanx!!!!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|