Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: Grafik / Sound / Multimedia (https://www.delphipraxis.net/21-library-grafik-sound-multimedia/)
-   -   Delphi x Quadrat hintereinander (https://www.delphipraxis.net/2642-x-quadrat-hintereinander.html)

Daniel B 31. Jan 2003 00:06


x Quadrat hintereinander
 
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
const
  iGroesse = 50;
var
  i, j, s: integer;
  Rect: TRect;
  Point: TPoint;

begin
  for i := 0 to strToInt(XSize.Text) do
  begin
    Point.Y := 1;
    Point.X := (i * iGroesse) + 1;
    Rect.TopLeft :=Point;

    Point.y := iGroesse;
    Point.x := (i * iGroesse) + 1 + iGroesse;
    Rect.BottomRight:=Point;
    PaintBox1.Canvas.Rectangle(Rect);
//    PaintBox1.Canvas.Rectangle(i * iGroesse + 1, 1, (i + iGroesse) * iGroesse, 1 * iGroesse);
  end;
end;
Von phlux!

Grüsse, Daniel :hi:


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:24 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz