ok ho fatto un casino tremendo...
ecco il mio codice...
codice:procedure TForm1.scriviClick(Sender: TObject); var file1: TStringList; testo: Tstrings; fnome: string; begin fnome := nome.Text; testo := txt.lines; {<-- TMemo.lines:TStrings} file1 := TStringList.Create; try file1.add(testo); {non va! uncompatible 'TStringList' e 'TStrings'} file1.SaveToFile(filenome); finally file1.Free; end; end; procedure TForm1.leggiClick(Sender: TObject); var file2: TStringList; begin file2 := TStringList.Create; try file2.loadFromFile(filenome); label1.Caption := file2.Text ; finally file2.Free; end; end;![]()

Rispondi quotando