Autor Beitrag
Smartie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Di 19.04.05 16:00 
Servus!

Oki, nachdem dank Hilfe aus dem Forum, meine ASCII-Dateien gut ankommen, stehe ich wiedermal vor einer "Kleinigkeit"

Ich habfolgendes eifnach mal ausprobiert:

ausblenden volle Höhe Delphi-Quelltext
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:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    OpenDialog1: TOpenDialog;

    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;


implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var datei, inistring : string;
    ini : TIniFile;
begin
    if opendialog1.execute then
    datei := opendialog1.FileName

    else datei := '';

    ini := TIniFile.Create(datei);

    try
      inistring := ini.readstring('Satz1', 'Urheber', '');

    finally
      ini.Free;    // Ini freigeben

    label1.Caption := inistring;
end;



end.


Nur bringt er mir die Fehlermeldung:
ausblenden Quelltext
1:
[Fehler] Unit1.pas(32): Undefinierter Bezeichner: 'TIniFile'					


Ähm.. hab ich igendwas nicht eingebunden oder so? Hab aber weder in meinen "Schlauen büchern" noch in der Delphi-Hilfe einen hinweis darauf gefunden.

Fuß zum Gruß

Smartie

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 19.04.05 16:02 
Es fehlt:
ausblenden Delphi-Quelltext
1:
2:
uses
  IniFiles;
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Di 19.04.05 16:11 
Oki, zu trivial, als daß es Erwähnung findet.

Danke schön!

Smartie