Главная » Файлы » Для учня/студента » Інформатика [ Добавить материал ]

Інформатика інформатичний
16.06.2010, 14:17
unit Unit1;

interface

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

type
TForm1 = class(TForm)
Memo1: TMemo;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
Button1: TButton;
Button2: TButton;
FontDialog1: TFontDialog;
ColorDialog1: TColorDialog;
Button3: TButton;
Button4: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button2Click(Sender: TObject);
begin
with OpenDialog1 do
begin
if not Execute then Exit;
Memo1.Lines.LoadFromFile(FileName);
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
with SaveDialog1 do
begin
If not Execute then Exit;
Memo1.Lines.LoadFromFile(FileName);
end;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
with FontDialog1 do
begin
If not Execute then Exit;
Memo1.Font:=Font;
end;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
with ColorDialog1 do
begin
If not Execute then Exit;
Memo1.Color:=Color;
end;
end;

end.

Категория: Інформатика | Добавил: Zet
Просмотров: 254 | Загрузок: 0 | Рейтинг: 0.0/0