6. OnClick:
procedure TLab2.N1Click (Sender: TObject);
begin
if SaveDialog1.Execute then Memo1.Lines.SaveToFile (SaveDialog1.FileName); end;
procedure TLab2.N2Click (Sender: TObject);
begin
if OpenDialog1.Execute and FileExists(OpenDialog1.FileName) then Memo1.Lines.LoadFromFile (OpenDialog1.FileName);
end;
7. 3 : MainMenu1; SaveDialog1.
8. .
9. OnClick:
procedure TLab3.N1Click (Sender: TObject);
type TClas = record f:string[30]; p:string[1]; ss: real; end;
var ff:File of TClas; Cl: TClas; i:integer;
begin
if SaveDialog1.Execute then AssignFile (ff,SaveDialog1.FileName)
else Exit;
rewrite(ff);
for i:= 1 to n do
begin
Cl.f:=f[i]; Cl.p:=p[i]; Cl.ss:= ss[i];
Write(ff,Cl);
End;
CloseFile(ff);
End; end;
.
Lab4 .
:
Color | . | |
Font | . | |
Picture | . . | |
Stretch | / , . | |
LoadFromFile | ||
SaveToFile | ||
Execute | . , True, . | |
:
, , , .
1. TFontDialog Memo1 2. 2. .
2. TColorDialog TStringGrid. 3. .
3. Lab2: ; . : ; ; . , .
4. . . .
Lab4.
5
|
|
. . . .
Delphi . ( , ..) . .
. , . :
If Form1 = Nil then Form1:= TForm1.Create(Application);
. Reliase.
If Form1 <> Nil then Release;
Show . ShowModal .
Show, Uses. Delphi Uses. , , File/Uses Unit. <OK>. , , Delphi .
Hide .
Close , . , , (, ), . , , . Close : Application.Terminate.
BorderIcons.
Icon. . Menu.
BorderStyle.
.
1. BorderIcons. , .
2. BorderStyle. .
3. Icon, . Images/Icons.