1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60:
| unit Auto1;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button4Click(Sender: TObject); private public end;
var Form1: TForm1; x, y, Dicke, i: Integer; Quelle, Ziel: TRect; implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject); begin Canvas.Rectangle (100, 100, 300, 150); Canvas.Ellipse (125, 125, 175, 175); Canvas.Ellipse (225, 125, 275, 175); Canvas.MoveTo (100, 100); Canvas.LineTo (125, 50); Canvas.LineTo (215, 50); Canvas.LineTo (265, 100); end;
procedure TForm1.Button2Click(Sender: TObject); begin Refresh; end;
procedure TForm1.Button4Click(Sender: TObject); begin for i := x-300 to y-300 do begin Quelle := Rect (100, 50, 300, 300); Ziel := Rect (400, 50, 600, 300); Canvas.CopyRect (Ziel, Canvas, Quelle); sleep (10); end; end; end. |