![]() |
delphide dx-ball
unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, jpeg, ExtCtrls; type TForm1 = class(TForm) Panel1: TPanel; Timer1: TTimer; Image1: TImage; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); private { Private declarations } public { Public declarations } end; var Form1: TForm1; str,stn:integer; xx,yy:integer; demo:boolean; implementation {$R *.dfm} procedure oyun; var i,j:integer; begin str:=str+1; stn:=stn+1; xx:=10; yy:=10; end; procedure TForm1.FormCreate(Sender: TObject); begin form1.Color:=clyellow; randomize(); caption:='dxball'; show; horzscrollbar.Visible:=false; vertscrollbar.Visible:=false; keypreview:=true; panel1.Top:=clientheight-100; image1.Width:=28; image1.Height:=28; oyun; timer1.Interval:=50; end; procedure TForm1.Timer1Timer(Sender: TObject); begin if image1.Left<=0 then xx:=-xx; if image1.Left>= clientwidth then xx:=-xx; if image1.Top<0 then yy:=-yy; if (image1.Top>=panel1.Top) and (image1.Top<(panel1.Top+panel1.Height)) and (image1.Left>panel1.Left) and (image1.Left<(image1.Left+image1.Width)) then yy:=-yy; if image1.Top>=clientheight then begin timer1.Enabled:=false; showmessage('bu oyun burda biter'); end; image1.Left:=image1.Left+xx; image1.Top:=image1.Top+yy; end; procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin panel1.Left:=x; end; end. |
Saat: 03:08 |
Telif Hakları vBulletin® v3.8.4 Copyright ©2000 - 2025, ve
Jelsoft Enterprises Ltd.'e Aittir.
Search Engine Optimisation provided by
DragonByte SEO v2.0.37 (Lite) -
vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.