Autor Beitrag
mhxcm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 54



BeitragVerfasst: Mi 13.02.08 13:53 
Moin,

mal wieder was zu Speichern und Laden!

Problem: Ich möchte verschiedene Benutzer anlegen können, die in meinem Programm verschiedene Fortschritte erzielen können. Nun stellt sich mir die Frage wie ich alleine schon den Benutzernamen abspeichern kann.

Quelltext:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure Tbenutzer.btnokbenutzerClick(Sender: TObject);
begin
     hauptmenue.lblname.caption := edtname.text;
     hauptmenue.lblvorname.caption := edtvorname.text;
     hauptmenue.lblspielername.caption := edtspielname.text;


das orange, also das was dort in den EDIT Feldern drinne steht würde ich z.B. gerne Abspeichern und wieder laden können. Wenn ich weiß wie das geht, werde ich mich wohl bei dem rest durchschlagen könne. Habe leider bis jetzt noch nie mit Speichern und Laden zu tun gehabt.

mfg Markus

_________________
1100101 heißt ich Liebe dich ich möchte bei dir sein! (search Song:"Das Modul - 1100101") ;)
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 13.02.08 13:56 

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
mhxcm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 54



BeitragVerfasst: Mi 13.02.08 14:22 
Ok, schönes Tutorial, aber wie bekomme ich jetzt mein String, der in edtname.text steht da rein gespeichert?

_________________
1100101 heißt ich Liebe dich ich möchte bei dir sein! (search Song:"Das Modul - 1100101") ;)
nagel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 708

Win7, Ubuntu 10.10

BeitragVerfasst: Mi 13.02.08 14:32 
Steht auch da drin.
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 13.02.08 14:32 
Ist doch alles schön beschrieben
ausblenden Delphi-Quelltext
1:
ini.WriteString('Sektion1', 'Eigenschaft1', edtname.text);					

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
mhxcm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 54



BeitragVerfasst: Mi 13.02.08 14:39 
Ja, funktioniert. Abschließende Frage: "Ist es mir den möglich mehrere Benutzer in einer Ini Datei zu speichern, oder müsste ich dann für jeden eine Anlegen?"

_________________
1100101 heißt ich Liebe dich ich möchte bei dir sein! (search Song:"Das Modul - 1100101") ;)
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 13.02.08 14:42 
Schreib z.B. für jeden Benutzer eine eigene Sektion, und gut ist.