Advertisement
Guest User

Untitled

a guest
May 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. Сделай так, чтоб это позорище никто не увидел)
  2. unit Unit1;
  3.  
  4. interface
  5.  
  6. uses
  7. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  8. Dialogs, jpeg, ExtCtrls, Menus;
  9.  
  10. type
  11. TForm1 = class(TForm)
  12. Image1: TImage;
  13. Image2: TImage;
  14. Image3: TImage;
  15. Timer2: TTimer;
  16. Image4: TImage;
  17. Image5: TImage;
  18. Image6: TImage;
  19. Image7: TImage;
  20. Image8: TImage;
  21. Image9: TImage;
  22. Image10: TImage;
  23. Image11: TImage;
  24. Image12: TImage;
  25. Image13: TImage;
  26. Image14: TImage;
  27. Image15: TImage;
  28. Image16: TImage;
  29. Image17: TImage;
  30. procedure Timer2Timer(Sender: TObject);
  31.  
  32.  
  33.  
  34. procedure Timer1Timer(Sender: TObject);
  35. procedure FormCreate(Sender: TObject);
  36.  
  37. private
  38. { Private declarations }
  39. public
  40. { Public declarations }
  41. end;
  42.  
  43. var
  44. Form1: TForm1;
  45.  
  46. implementation
  47.  
  48. {$R *.dfm}
  49.  
  50.  
  51.  
  52. procedure TForm1.FormCreate(Sender: TObject);
  53. begin
  54.  
  55. FORM1.Height:=IMAGE1.Height;
  56. FORM1.Width:=IMAGE1.Width;
  57. IMAGE1.Top:=0;
  58. IMAGE1.Left:=0;
  59.  
  60. end;
  61.  
  62. procedure TForm1.Timer1Timer(Sender: TObject);
  63. var n: integer;
  64. begin
  65. image17.Visible:=false;
  66. image2.Left:=image2.left+3;
  67.  
  68. if image2.Left div 2 = 0 then
  69. image2.Visible:=false;
  70. if image4.Left-image2.Left< image2.width then // упростить
  71. image4.Visible:=false;
  72. if image5.Left-image2.Left< image2.width then
  73. image5.Visible:=false;
  74. if image6.Left-image2.Left< image2.width then
  75. image6.Visible:=false;
  76. if image7.Left-image2.Left< image2.width then
  77. image7.Visible:=false;
  78. if image8.Left-image2.Left< image2.width then
  79. image8.Visible:=false;
  80. if image9.Left-image2.Left< image2.width then
  81. image9.Visible:=false;
  82. if image10.Left-image2.Left< image2.width then
  83. image10.Visible:=false;
  84. if image11.Left-image2.Left< image2.width then
  85. image11.Visible:=false;
  86. if image12.Left-image2.Left< image2.width then
  87. image12.Visible:=false;
  88. if image13.Left-image2.Left< image2.width then
  89. image13.Visible:=false;
  90. if image14.Left-image2.Left< image2.width then
  91. image14.Visible:=false;
  92. if image15.Left-image2.Left< image2.width then
  93. image15.Visible:=false;
  94. if image16.Left-image2.Left< image2.width then
  95. image16.Visible:=false;
  96.  
  97. begin // упростить
  98. if image1.width-image2.Left<image2.width then
  99. image2.Visible:=false;
  100. if image1.width-image2.Left<image2.width then
  101. image3.Visible:=false;
  102. if image1.width-image2.Left<image2.width then
  103. image17.Visible:=true;
  104. end;
  105. image17.TOP:=image17.TOP+3;
  106.  
  107.  
  108. end;
  109.  
  110. procedure TForm1.Timer2Timer(Sender: TObject);
  111. var n: integer;
  112. begin
  113. image3.visible:=false;
  114. image3.Left:=image3.left+3;
  115.  
  116. for n:=0 to 100 do
  117. if image3.Left=(5+6*n) then
  118. image3.Visible:=true;
  119. end;
  120.  
  121. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement