getajob20
asked on
Formless Application which needs to sort a TStrings variable
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.
The application doesnt take any user input, which is why I want it formless.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TStringList has a Sorted property
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?
ASKER
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
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
ASKER
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.