Go Back   Genel Paylaşım Forumu - Seversintabi.Com > >
Kayıt ol Yardım Topluluk Takvim Bugünki Mesajlar Arama

Cevapla
 
Seçenekler Stil
  #1  
Alt 23 July 2009, 11:31
Nixie
Guest
 
Mesajlar: n/a
Standart 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.
Alıntı ile Cevapla
Cevapla


Yetkileriniz
Konu Açma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı

Forum Seç

Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Koltuk Kaptırma Korkusu Alt Kademeyi Yakıyor! Yorgun Yürek Kariyer - Başarı 0 18 June 2009 01:22
Galeta Yorgun Yürek efgğhıij 0 25 March 2009 17:05


Saat: 12:43


Telif Hakları vBulletin® v3.8.4 Copyright ©2000 - 2025, ve
Jelsoft Enterprises Ltd.'e Aittir.