CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Sort of files

  1. #1
    Join Date
    Sep 2000
    Posts
    127

    Sort of files

    Suppose my default directory is 'C:' , i have 4 files 1files.jpg , 2files,jpg , 3files.jpg & 4files.jpg. Can i sort this 4 files in the order of 1files.jpg , 2files,jpg ..to 4files.jpg just in case they are no in this order in this directory ? I need to sort this out so that i can load it into a picturebox in this order.


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Sort of files

    Add the filenames to a ListBox Control with the Sorted property set to true. Then, when loading the pictures, take the filename form this listbox. Set the visible property of the listbox to false.

    Using the listbox is a quick method of sorting things, if speed is not a problem for your application.


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

Featured