AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Problem beim Laden mit Ini's

Ein Thema von mOzZzI · begonnen am 25. Feb 2006 · letzter Beitrag vom 25. Feb 2006
Antwort Antwort
Benutzerbild von ManuMF
ManuMF

Registriert seit: 11. Jul 2005
1.016 Beiträge
 
Delphi 6 Personal
 
#1

Re: Problem beim Laden mit Ini's

  Alt 25. Feb 2006, 19:26
Das war jetzt ein bisschen Mischmasch

Delphi-Quellcode:
begin
  ForceDirectories(ExtractFilePath(ParamStr(0))+'Settings');
  with TiniFile.Create(ExtractFilePath(ParamStr(0))+'Settings\'+'config.dat') do //create iniFile
    try
      Form1.Width := ReadInteger('POSITION', 'WIDTH', 0); //load form settings
      Form1.Height := ReadInteger('POSITION', 'HEIGHT', 0); //load form settings
    finally
      Free;
    end;
end;
oder besser:

Delphi-Quellcode:
var ini: TIniFile;
begin
  ForceDirectories(ExtractFilePath(ParamStr(0))+'Settings');
  ini := TIniFile.Create(ExtractFilePath(ParamStr(0))+'Settings\'+'config.dat');
  with ini do
    try
      Form1.Width := ReadInteger('POSITION', 'WIDTH', 0); //load form settings
      Form1.Height := ReadInteger('POSITION', 'HEIGHT', 0); //load form settings
    finally
      Free;
    end;
end;
Gruß,
ManuMF
Gruß,
ManuMF

Endlich hab ich was Positives an Vista entdeckt: Das mitgelieferte Mahjongg
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:58 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz