AssignFile(...); Reset(f); while not EOF(f) do begin Readln(f, s); text := text + s; end; .... .... MessageBox(..., PChar(text), ...);