Лістинг программиUnit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, StdCtrls;=class (TForm): TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TEdit;:TEdit ;: TEdit ;: TEdit ;: TEdit ;: TButton ;: TButton ;: TLabel ;: TEdit ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel; Button2Click (Sender: TObject ); Button1Click (Sender: TObject);
{Private declarations}
{Public declarations}
end ;: TForm1;
implementation
{$ R *. dfm}
procedure TForm1. Button1Click (Sender: TObject); x1, x2, x3, y1, y2, y3: integer;
begin :=strtoint (edit1. Text) ;:=strtoint (edit2. Text) ;:=strtoint (edit3. Text) ;:=strtoint (edit4. Text ) ;:=strtoint (edit5. Text) ;:=strtoint (edit6. text) ;. Pen. Width:=4 ;. Pen. Color:=(Random (256), Random (256), Random (256)); (Random (256), Random (256), Random (256)) ;. Brush. Color:=(Random (256), Random (256), Random (256)) ;. polyLine ([point (X1, Y1), point (X2, Y2), point (X3, Y3)]);
end; TForm1. Button2Click (Sender: TObject);
form1. Refresh;
end;.
Результат роботи
Малюнок 4. 1