Results 1 to 2 of 2

Thread: Easy Way to Add Files to Listview

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Yugoslavia
    Posts
    2

    Angry

    What is the easy way to add files to listview Control
    i tryed with vba.dir but I can seem to find the way to
    put more then one files I am also using fastlib2000 controls but i have the same problem
    it would be nice if don't use API calls thx

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    Code:
    Dim sFile As String
    sFile = Dir$("C:\*.*")
    Do While sFile <> ""
        If sFile <> "." And sFile <> ".." Then
            List1.Add sFile
        End If
        ' calling dir without a path "resumes" from the last file returned
        sFile = Dir
    Loop
    If you want to include subdirs I guess you're stuck with the FindFirst and FindNext API's, since the Dir "resets" when you call it again with another path.

    edit: oh I add the files to a listbox, but I assume you know how to use the listview...
    Hope this helps

    Crazy D

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