Реферат: Лабораторная работа №1 по Delphi
procedure TForm1.Button2Click(Sender: TObject);
begin
if ColorDialog1.Execute then
Form1.Color:=ColorDialog1.Color;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if colorDialog1.Execute then
Shape1.Brush.Color:=ColorDialog1.Color;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Shape1.Shape:=TShapeType(ComboBox1.ItemIndex);
end;
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
Shape1.Width:=ScrollBar1.Position*3;
end;
procedure TForm1.ScrollBar2Change(Sender: TObject);
begin
Shape1.Height:=Scrollbar2.Position*2;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Close;
end;
end.
Внешний вид программы: