SpeedButton4Click (Sender: TObject);
begin
nam: = nam + '# балкон1';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '4 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + ' Іконки балкон1.bmp');
Parent: = Panel2; end; end;
procedure TForm6.SpeedButton6Click (Sender: TObject);
begin
nam: = nam + '# Вхід';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '6 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + ' Іконки вход.bmp');
Parent: = Panel2; end; end;
procedure TForm6.SpeedButton5Click (Sender: TObject);
begin
nam: = nam + '# балкон2';
b1: = TBitBtn.Create (Self);
with b1 do begin
b1.Hint: = '5 ';
Left: = 20;
Top: = 20;
Width: = 60;
Height: = 100;
Glyph.LoadFromFile (dir + ' Іконки балкон2.bmp');
Parent: = Panel2; end; end;
procedure TForm6.UpDown1Click (Sender: TObject; Button: TUDBtnType);
begin
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.Width: = UpDown1.Position * 3;
end;
procedure TForm6.UpDown2Click (Sender: TObject; Button: TUDBtnType);
begin
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1.Sender.Height: = UpDown2.Position * 3;
end;
procedure TForm6.Panel2MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
const
SC_DragMove = $ F012; {a magic number}
begin
ReleaseCapture;
if Msg1.Sender.ClassName = 'TBitBtn' then
msg1. Sender.perform (WM_SysCommand, SC_DragMove, 0);
end;
procedure TForm6.SpeedButton11Click (Sender: TObject);
Var p: integer;
begin
if Msg1.Sender.ClassName = 'TBitBtn' then begin
if msg1.Sender.Hint = '1 'then begin p: = pos ('# Глухий', nam); delete (nam, p, 7); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '2 'then begin p: = pos ('# Поворотний', nam); delete (nam, p, 11); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '3 'then begin p: = pos ('# Відкидний', nam); delete (nam, p, 9); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '4 'then begin p: = pos ('# балкон1', nam); delete (nam, p, 8); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '5 'then begin p: = pos ('# балкон2', nam); delete (nam, p, 8); msg1.Sender.Destroy; end;
if msg1.Sender.Hint = '6 'then begin p: = pos ('# Вхід', nam); delete (nam, p, 5); msg1.Sender.Destroy; end; end; end;
procedure TForm6.SpeedButton9Click (Sender: TObject);
var
B: TBitmap;
srcRect, dstRect: TRect;
begin
B: = TBitmap.Create;
with dstRect do begin
Left: = 0;
Top: = 0;
Right: = Panel2.Width +1;
Bottom: = Panel2.Height +1;
end;
with srcRect do begin
Left: = Panel2.Left +15;
Right: = Panel2.Left + Panel2.Width +12;
Top: = Panel2.Top;
Bottom: = Panel2.Top + Panel2.Height +12;
end;
B.Width: = Panel2.Width;
B.Height: = Panel2.Height;
B.Canvas.CopyRect (dstRect, Self.Canvas, srcRect);
B.PixelFormat: = pf1bit;
B.SaveToFile (dir + ' Шаблони ' + nam + '. bmp');
ShowMessage ('Шаблон успішно зберігся! ');
B.Free; end;
procedure TForm6.SpeedButton8Click (Sender: TObject);
begin close; end; end.
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, unit1, ComCtrls, Buttons, Grids, Spin, jpeg;
type
TForm7 = class (TForm)
Panel1: TPanel; Panel2: TPanel; SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton; SpeedButton3: TSpeedButton;
SpeedButton5: TSpeedButton; SpeedButton6: TSpeedButton;
SpeedButton9: TSpeedButton; SpeedButton10: TSpeedButton;
Image1: TImage; SpeedButton7: TSpeedButton; SpeedButton8: TSpeedButton;
ComboBox1: TComboBox; Label4: TLabel; Label3: TLabel;
ComboBox3: TComboBox; Label2: TLabel; ComboBox2: TComboBox;
UpDown1: TUpDown; UpDown2: TUpDown; Image2: TImage;
OpenDialog1: TOpenDialog; SpeedButton4: TSpeedButton;
SpeedButton14: TSpeedButton; SpeedButton15: TSpeedButton;
SpeedButton16: TSpeedButton; SpeedButton11: TSpeedButton;
SpeedButto...