Einzelnen Beitrag anzeigen

Benutzerbild von APP
APP

Registriert seit: 24. Feb 2003
Ort: Graz (A)
705 Beiträge
 
Delphi 7 Enterprise
 
#2

Re: Position von Programmfenster in *.ini speichern?

  Alt 14. Okt 2003, 09:50
Hallo Tim,

global
Delphi-Quellcode:
CONST
...
  SectionSystem = 'System';
  KeyFormLeft = 'FormLeft';
  KeyFormTop = 'FormTop';
...
(fMain = Hauptformular)

schreiben (z.B. in FormDestroy/Close)
Delphi-Quellcode:
  IniFile.WriteInteger(SectionSystem, KeyFormLeft, fMain.Left);
  IniFile.WriteInteger(SectionSystem, KeyFormTop, fMain.Top);
lesen (z.B. in FormCreate)
Delphi-Quellcode:
  fMain.Left:= IniFile.ReadInteger(SectionSystem, KeyFormLeft, 0);
  fMain.Top:= IniFile.ReadInteger(SectionSystem, KeyFormTop, 0);
Armin P. Pressler

BEGIN
...real programmers are using C/C++ - smart developers Delphi;
END;
  Mit Zitat antworten Zitat