unit Kurve;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, jpeg, ExtCtrls, Math, ExtDlgs;
type
TForm9 =
class(TForm)
Image1: TImage;
Label1: TLabel;
Button1: TButton;
MainMenu1: TMainMenu;
MainMenu2: TMenuItem;
Exit1: TMenuItem;
Help1: TMenuItem;
Open1: TMenuItem;
OpenDialog1: TOpenDialog;
Edit1: TEdit;
StaticText1: TStaticText;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure Exit1Click(Sender: TObject);
procedure Open1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form9: TForm9;
filename :
string;
implementation
{$R *.dfm}
procedure TForm9.Button1Click(Sender: TObject);
begin
close();
end;
procedure TForm9.Exit1Click(Sender: TObject);
begin
close();
end;
// liest Datei in Memofeld ein
procedure TForm9.Open1Click(Sender: TObject);
var S,helpstring :
string;
F : TextFile;
begin
if OpenDialog1.Execute
then
filename:= OpenDialog1.FileName;
AssignFile(F, OpenDialog1.FileName);
// Datei ausgewählen
Reset(F);
while not eof (F)
do begin
Readln(F, helpstring);
//Erste Zeile der Datei lesen
S:=S + helpstring;
Memo1.Text := S;
//String in ein Memo schreiben
end;
CloseFile(F);
end;
end.