Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 27.04.05 12:51 
Wie kann ich ich den Inhalt eines Memos speichern??
Am besten in eine .txt Datei??
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 27.04.05 12:53 
ausblenden Delphi-Quelltext
1:
 memo1.Lines.SaveToFile('myfile.txt');					

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 27.04.05 13:03 
ok danke, das hab ich gesucht.

und wie druck ich den Inhalt eines Memos, hab da drüber absolut nix in der Hilfe gefunden. Den PrintDialog hab ich schon, aber jetzt weiss ich nicht mehr weiter.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mi 27.04.05 13:03 
Die Methode zum Speichern des Inhalts von Memos ist die da:
ausblenden Delphi-Quelltext
1:
SaveToFile(FileName);					

Im Code sieht das dann ungefähr so aus:
ausblenden Delphi-Quelltext
1:
Memo1.Lines.SaveToFile( 'textdatei.txt' );					

Wenn du möchtest, dass die Datei textdatei.txt in dem Ordner gespeichert wird, wo sich dein Programm befindet, musst du noch den Pfad aus ParamStr(0) extrahieren:
ausblenden Delphi-Quelltext
1:
Memo1.Lines.SaveToFile( ExtractFileDir(ParamStr(0)) + 'textdatei.txt' );					

Zum Laden:
ausblenden Delphi-Quelltext
1:
Memo1.Lines.LoadFromFile( 'textdatei.txt' );					

bzw.:
ausblenden Delphi-Quelltext
1:
Memo1.Lines.LoadFromFile( ExtractFileDir(ParamStr(0)) + 'textdatei.txt' );					


;)

PS.: Die Forensuche hätte auch geholfen... ;)

//EDIT: O Gott... Ich hätte mir nichts zu essen holen sollen... :autsch:
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 27.04.05 13:07 
user profile iconWeBsPaCe hat folgendes geschrieben:
Ich hätte mir nichts zu essen holen sollen... :autsch:

:lol: bäääääääätsch :twisted: :dance2:

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mi 27.04.05 13:08 
user profile iconcsigg hat folgendes geschrieben:
und wie druck ich den Inhalt eines Memos, hab da drüber absolut nix in der Hilfe gefunden. Den PrintDialog hab ich schon, aber jetzt weiss ich nicht mehr weiter.

Ich glaub ich hab's schonmal geschrieben: Die Suche!! ;) Und außerdem: Neues Thema, neuer Thread. ;)

Aber weil ich ja kein Mod bin:
:arrow: www.delphi-forum.de/...ghlight=memo+drucken
:arrow: www.delphi-forum.de/...ghlight=memo+drucken

:mrgreen:
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mi 27.04.05 13:19 
Sorry, ich vergess manchmal suchmethoden, es gibt soviele davon

Delphi-Hilfe
Delphi Buch
Kollegen
Google
DF-Suche
...