Results 1 to 6 of 6

Thread: [RESOLVED] File Listbox

  1. #1

    Thread Starter
    Member devil_jin's Avatar
    Join Date
    Feb 2006
    Location
    USA
    Posts
    44

    Resolved [RESOLVED] File Listbox

    Hey all is there any way that after you select your drive then select your folder then in the file listbox it shows everythign how can display everything in there into a textbox?

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: File Listbox

    is this what you want
    VB Code:
    1. Private Sub Dir1_Click()
    2.     File1.Path = Dir1.List(Dir1.ListIndex)
    3. End Sub
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3

    Thread Starter
    Member devil_jin's Avatar
    Join Date
    Feb 2006
    Location
    USA
    Posts
    44

    Re: File Listbox

    I mean like when File1 Loads all your music i want all that into a textbox

  4. #4

    Thread Starter
    Member devil_jin's Avatar
    Join Date
    Feb 2006
    Location
    USA
    Posts
    44

    Re: File Listbox

    As text

  5. #5
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: File Listbox

    this does what you want separated by commas
    VB Code:
    1. Private Sub Dir1_Click()
    2.     File1.Path = Dir1.List(Dir1.ListIndex)
    3.     Text1.Text = ""
    4.     Dim a As Long
    5.     For a = 0 To File1.ListCount - 1
    6.         Text1.Text = Text1.Text & " " & File1.List(a)
    7.         If a < File1.ListCount - 1 Then
    8.             Text1.Text = Text1.Text & ","
    9.         End If
    10.     Next
    11. End Sub
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  6. #6

    Thread Starter
    Member devil_jin's Avatar
    Join Date
    Feb 2006
    Location
    USA
    Posts
    44

    Re: File Listbox

    Thx i made something a lil similar works perfect

    Code:
    Dim Music As String
    For i = 0 To File1.ListCount - 1
    Music = Music & File1.List(i) & vbNewLine
    Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width