Results 1 to 9 of 9

Thread: Sort By Basename Url

  1. #1

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Sort By Basename Url

    I assume you just want an alphabetic sort. If that's the case, you can stick the strings into a (possibly hidden) ListBox, make the .Sorted property true, and read them back out in order. There are of course more ways, but this one has the advantage of being very quick to code--you avoid writing your own sort routine.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2008
    Posts
    84

    Re: Sort By Basename Url

    hmm, thnx... any direct way?

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Sort By Basename Url

    Look at this thread in the CodeBank section. Several sorting routines to choose from
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2008
    Posts
    84

    Re: Sort By Basename Url

    i cant figure out.... sorry..... which one....

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Sort By Basename Url

    Your choice. Read the posts, the author described which may be better suited for different scenarios.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #7
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    Re: Sort By Basename Url

    Quick rule of thumb that I use:

    Up to a couple hundred items, insertionsort is fine
    Up to several thousand, I personally like combsort for its simplicity
    Over several thousand, quicksort3 is your best bet

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Aug 2008
    Posts
    84

    Re: Sort By Basename Url

    i tried quicksort3

    but it didn't sorted out in order!

  9. #9
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Sort By Basename Url

    If you're having trouble with other methods, I'd suggest you just use the ListBox approach. It's very simple to implement: add a ListBox to a form, set .Visible to false, set .Sorted to true, use .AddItem to add your elements, and then use .List to read them back in order.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

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