Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Сделай так, чтоб это позорище никто не увидел)
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, jpeg, ExtCtrls, Menus;
- type
- TForm1 = class(TForm)
- Image1: TImage;
- Image2: TImage;
- Image3: TImage;
- Timer2: TTimer;
- Image4: TImage;
- Image5: TImage;
- Image6: TImage;
- Image7: TImage;
- Image8: TImage;
- Image9: TImage;
- Image10: TImage;
- Image11: TImage;
- Image12: TImage;
- Image13: TImage;
- Image14: TImage;
- Image15: TImage;
- Image16: TImage;
- Image17: TImage;
- procedure Timer2Timer(Sender: TObject);
- procedure Timer1Timer(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- FORM1.Height:=IMAGE1.Height;
- FORM1.Width:=IMAGE1.Width;
- IMAGE1.Top:=0;
- IMAGE1.Left:=0;
- end;
- procedure TForm1.Timer1Timer(Sender: TObject);
- var n: integer;
- begin
- image17.Visible:=false;
- image2.Left:=image2.left+3;
- if image2.Left div 2 = 0 then
- image2.Visible:=false;
- if image4.Left-image2.Left< image2.width then // упростить
- image4.Visible:=false;
- if image5.Left-image2.Left< image2.width then
- image5.Visible:=false;
- if image6.Left-image2.Left< image2.width then
- image6.Visible:=false;
- if image7.Left-image2.Left< image2.width then
- image7.Visible:=false;
- if image8.Left-image2.Left< image2.width then
- image8.Visible:=false;
- if image9.Left-image2.Left< image2.width then
- image9.Visible:=false;
- if image10.Left-image2.Left< image2.width then
- image10.Visible:=false;
- if image11.Left-image2.Left< image2.width then
- image11.Visible:=false;
- if image12.Left-image2.Left< image2.width then
- image12.Visible:=false;
- if image13.Left-image2.Left< image2.width then
- image13.Visible:=false;
- if image14.Left-image2.Left< image2.width then
- image14.Visible:=false;
- if image15.Left-image2.Left< image2.width then
- image15.Visible:=false;
- if image16.Left-image2.Left< image2.width then
- image16.Visible:=false;
- begin // упростить
- if image1.width-image2.Left<image2.width then
- image2.Visible:=false;
- if image1.width-image2.Left<image2.width then
- image3.Visible:=false;
- if image1.width-image2.Left<image2.width then
- image17.Visible:=true;
- end;
- image17.TOP:=image17.TOP+3;
- end;
- procedure TForm1.Timer2Timer(Sender: TObject);
- var n: integer;
- begin
- image3.visible:=false;
- image3.Left:=image3.left+3;
- for n:=0 to 100 do
- if image3.Left=(5+6*n) then
- image3.Visible:=true;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement