Sorry, die Deklaration von TDatei muss ebenfalls mit in den interface-Abschnitt.
Der Quellcode in Unit1 sollte jetzt so aussehen (Auszug):
Delphi-Quellcode:
...
type
TFilm = Record
Filmtitel:String[50];
Qualitaet:Byte;
Humor:Byte;
Spannung:Byte;
Action:Byte;
Medium:TCombobox;
Datent:Byte;
End;
Type TDatei = File Of TFilm;
TForm1 = class(TForm)
Label1: TLabel;
Image1: TImage;
Image2: TImage;
StringGrid1: TStringGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
MainMenu1: TMainMenu;
Datei: TMenuItem;
Neu1: TMenuItem;
SpeichernUnter1: TMenuItem;
Speicher1: TMenuItem;
N1: TMenuItem;
Hilfe1: TMenuItem;
Sortrieren1: TMenuItem;
Kurzhilfe1: TMenuItem;
Titel1: TMenuItem;
Bildqualitt1: TMenuItem;
Humor1: TMenuItem;
Action1: TMenuItem;
Spannung1: TMenuItem;
Medium1: TMenuItem;
AnzahlDatentrger1: TMenuItem;
N2: TMenuItem;
ArchivSchlieen1: TMenuItem;
ProgrammBeenden1: TMenuItem;
Ansicht: TMenuItem;
Archiv1: TMenuItem;
BearbeitDingBlatt1: TMenuItem;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ProgrammBeenden1Click(Sender: TObject);
procedure Archiv1Click(Sender: TObject);
procedure BearbeitDingBlatt1Click(Sender: TObject);
procedure ArchivSchlieen1Click(Sender: TObject);
procedure Neu1Click(Sender: TObject);
procedure N1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Movie:TDatei;
implementation
{$R *.DFM}
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Form1.close;
Form2.close;
end;
...
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)