Formless Application which needs to sort a TStrings variable

Posted on 2003-02-22
Medium Priority
Last Modified: 2010-04-04
I have written myself a wallpaper randomisation application, and this application currently uses a form with a TListBox component on it to sort the files alphabetically. I want to remove the form so it is quicker and smaller, but then I have the problem of sorting the filenames. How can I sort the contents of a TStrings variable, without using a form component?

The application doesnt take any user input, which is why I want it formless.
Question by:getajob20
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

svvada earned 150 total points
ID: 7999024
Try using the TStringList

Expert Comment

ID: 7999279
TStringList has a Sorted property
LVL 34

Expert Comment

ID: 7999638
hello getajob20, you can do code in your Program, .DPR file and have a TstringList and many other things, but if you do NOT have a window and a GetMessage Loop then you will have trouble keeping your program running, or do you need it to keep running?, If file size is your concern then you can do a API window and GetMessage loop Program, if not then just Hide your main form. Do you need code for an API window and GetMessage Loop program?

Author Comment

ID: 8000826
Slick182: The program closes as soon as it has changed the wallpaper.

Everyone else: I'll try that and report back as soon as I have tried it. I'll award points to swada if it works, as you were the first to respond. If not, i'll let you know

Author Comment

ID: 8001026
It wasn't a particularly in-depth solution to a general problem, so I awarded a C grade. If the problem warranted a more in-depth answer, and I was given the depth of answer I needed, I would increase the grade.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question