An alternative to using a memo is to use a TextFile variable. The following function accepts the file name as a parameter and returns the first line of the file as a string:
function ReadFirstLine(FileName: TFileName): String;
var
F: TextFile;
begin
AssignFile(F, FileName);
Reset(F);
Readln(F, Result);
CloseFile(F);
end;
Hope this helps.
Dave
nordicsys@aol.com