Registriert seit: 17. Okt 2007
154 Beiträge
|
Re: Paintbox Differnezberechnen
15. Mai 2008, 12:42
hab jetzt soviel
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
PaintBox1: TPaintBox;
Edit1: TEdit;
Button1: TButton;
procedure PaintBox1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.PaintBox1Click(Sender: TObject);
Var
i,x,y: integer ;
begin
x:= random (100);
canvas.moveto:= inttostr (x);
paintbox1.Canvas:= x;
y:= random (100);
canvas.MoveTo:= inttostr (y);
canvas.lineto:= (x,y);
end;
end.
|
|
Zitat
|