Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
Re: Array speichern
7. Mär 2007, 21:26
Hi,
1. SaveDialog aufs Formular packen (Wie gesagt unter "Dialogs" gucken)
2.
Delphi-Quellcode:
procedure TForm2.Button2Click(Sender: TObject);
var i: integer;
key: array[1..26] of integer;
f: TFileStream;
begin
if SaveDialog1.Execute then // öffnet den Dialog
begin // wenn auf "OK" gedrückt wurde:
f := TFileStream.Create(SaveDialog1.Filename,fmCreate);
try
for i := 0 to 26 do
f.write(key[i],sizeOf(integer));
finally
f.free;
end;
end;
end;
Gruß
Neutral General
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|