| Autor |
Beitrag |
jaenicke
      
Beiträge: 19346
Erhaltene Danke: 1754
W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
|
Verfasst: Mo 08.12.08 14:06
|
|
SAiBOT
      
Beiträge: 323
Erhaltene Danke: 6
XP SP2; 7
D7; D2009
|
Verfasst: Mo 08.12.08 14:33
_________________ Debuggers don't remove bugs, they only show them in slow-motion.
|
|
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1
|
Verfasst: Mo 08.12.08 15:07
Ist bei 2 Boolean auch dann blöde, wenn beide true sind 
|
|
Chemiker
      
Beiträge: 194
Erhaltene Danke: 14
XP, Vista 32 Bit, Vista 64 Bit, Win 7 64 Bit, Win 10, Win 11
BDS 2006, RAD Studio 2009+C++, Delphi 13, VS 2010 Prof.
|
Verfasst: Do 11.12.08 02:35
Hallo,
ich muss mich Entschuldigen, dass ich ohne genaue Prüfung ein Beispiel aus der Delphi – Hilfe übernommen habe.
Korrigierte Ini-Funktionen:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37:
| function IniSchreiben (aForm: TForm; strIniDateiName: TFileName): boolean; var Ini: TIniFile; begin Result:= True; ini:= TIniFile.Create(strIniDateiName); try Ini.WriteInteger(aForm.Caption, 'Top', aForm.Top); Ini.WriteInteger(aForm.Caption, 'Left', aForm.Left); Ini.WriteString(aForm.Caption, 'Caption', aForm.Caption ); Ini.WriteBool(aForm.Caption, 'InitMax', aForm.WindowState = wsMaximized ); finally Ini.Free; end; end;
function IniLesenAnlegen (aForm: TForm; strIniDateiName: TFileName): boolean; var Ini: TIniFile; begin Result:= TRUE; ini:= TIniFile.Create(strIniDateiName); try aForm.Top := Ini.ReadInteger( aForm.Caption, 'Top', 100 ); aForm.Left := Ini.ReadInteger( aForm.Caption, 'Left', 100 ); aForm.Caption := Ini.ReadString( aForm.Caption, 'Caption', aForm.Caption ); if Ini.ReadBool( aForm.Caption, 'InitMax', false ) then begin aForm.WindowState := wsMaximized; end else begin aForm.WindowState := wsNormal; end; finally Ini.Free; end; end; |
wsMinimized wird aber nicht behandelt, weis nicht welchen Sinn das machen soll.
Bis bald Chemiker
|
|
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1
|
Verfasst: Do 11.12.08 09:11
Das muss Dir doch nicht Leid tun, dass der Hersteller blödsinnigen Code in seine Beispiele schreibt.
|
|
|