FindBest ======= This is a very simple example of multithreaded application. Freeware. Full sourcecode is available on e-mail. You can then redistribute it everybody you want to, but please let me know. The purposes of my "creature" is to help dividing songs on tape sides in such a way that both sides have the same duration. This is not an attempt to avail piracy, I used it to optimize the usage of tapes for songs from MY OWN CDs an for MY OWN USE because I didn't have a portable CD player and I like very much hearing music while cycling. Using it is very simple: 1)just type in the duration of the songs in minutes and seconds. (For example a duration of 3 minutes and 9 seconds (3'09'') must be introduced as 309: the program itself translates it in secs) 2) Press 'Add' button or 'Enter' on your keyboard and the duration will be added in the Song listbox. 3) When you've finished introducing durations just press 'Find !' button and wait for results. If during the typing of data you made a mistake you can get rid of it selecting with the mouse the wrong item from Song listbox and then pressing 'Delete' button or you can Modify a wrong item selecting it and then pressing the 'Modify' button; in such a case the item will be copied back in the edit where you can correct it; then pressing 'Write back' button you give back to the listbox the right value for the item. 'Clear' buttons simply clear listboxes while 'END' button ... try to guess ! The 'Result' listbox shows you the results of the algorithimic attempt. Note that if you stop the algorithm with the 'Stop' button of the 'Still working' form the solution you obtain could not be the best: if you want the best let the algorithm finish 'naturally'. In the Result listbox we have Total time i.e. the sum of durations, Theoric best namely the result we wish to obtain on each side, then which side songs must be putted on and then real duration of both sides of the tape and the time used by my prog to give you a solution. Last but not the least the 'Show..' Checkbox let the listbox to show or not duration in secs for each song in the listbox. It also accepts messages from other applications. WM_USER=Add a song (duration of song in WParam, give back the number of song in the song listbox in the result field of the message) WM_USER+1=Try to find best combination (No params) WM_USER+2=Clear Song listbox (No params) So if you have a database of songs with their duration you can add simple code to send durations to my algorithm; you could also write code to extract datas from your database and then add it to my prog. Pay attention not to send wrong values such as 0 (Null duration) or too great number of seconds ! By now results are only displayed in the Result listbox. FREEWARE ======== Using of this application is free and at YOUR OWN RISK. It is distributed as freeware, and it may be redistributed as such. P.S. Please if you hear of an implementation of the 15-puzzle with algorithms to "auto-solve" a configuration let me know about it, because this is the project I'm involved by now. (There is also really a lot of bibliography on such a game in the Artificial Intelligence literature). E-mail me if you want a version of such a game. Both Delphi 1.0 and 2.0 versions available.