Interface
Uses
WinTypes, WinProcs, Classes, Graphics, Forms, Controls, ColorDlg, StdCtrls, Menus, Dialogs, ExtCtrls;
Type
TForm1 = class(TForm)
Shape1: TShape;
ColorDialog1: TColorDialog;
ScrollBar1: TScrollBar;
ScrollBar2: TScrollBar;
MainMenu1: TMainMenu;
Shapes1: TMenuItem;
ShapeColor1: TMenuItem;
FormColor1: TMenuItem;
Shapes2: TMenuItem;
Rectangle1: TMenuItem;
Square1: TMenuItem;
RoundRect1: TMenuItem;
RoundSquare1: TMenuItem;
Ellipes1: TMenuItem;
Circle1: TMenuItem;
Exit1: TMenuItem;
procedure NewShapeClick(Sender: TObject);
procedure ShapeColorClick(Sender: TObject);
procedure FormColorClick(Sender: TObject);
procedure ScrollBar2Change(Sender: TObject);
procedure ScrollBar1Change(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure Exit1Click(Sender: TObject);
Private
{ Private declarations }
Public
{ Public declarations }
end;
Var
Form1: TForm1;
Implementation
{$R *.DFM}
procedure TForm1.NewShapeClick(Sender: TObject);
Begin
Shape1.Shape := TShapeType((Sender as TMenuItem).Tag);
end;
procedure TForm1.ShapeColorClick(Sender: TObject);
Begin
If ColorDialog1.Execute then
Shape1.Brush.Color := ColorDialog1.Color;
end;
procedure TForm1.FormColorClick(Sender: TObject);
Begin
Дата добавления: 2015-03-19; просмотров: 607;