home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Rund1.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
-
- int x, y, Dicke;
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- Canvas->Ellipse (x, y, x+Dicke, y+Dicke);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button2Click(TObject *Sender)
- {
- TRect Quelle, Ziel;
- for (int i=x-5; i<ClientWidth-Dicke-x-5; i++)
- {
- Quelle = Rect(i, y-5, i+Dicke+5, y+Dicke+5);
- Ziel = Rect(i+1, y-5, i+Dicke+6, y+Dicke+5);
- Canvas->CopyRect(Ziel, Canvas, Quelle);
- // Bremse, abhΣngig vom Prozessortakt!
- for (int j=0; j<1000000; j++) ;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button3Click(TObject *Sender)
- {
- Refresh ();
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- x = 30;
- y = 30;
- Dicke = 150;
- }
- //---------------------------------------------------------------------------
-