SHARE
TWEET

Untitled

a guest Oct 21st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
  9.   ActnList, LCLType, DBCtrls;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     Button1: TButton;
  17.     Button2: TButton;
  18.     FullNoteHole10: TShape;
  19.     FullNoteHole11: TShape;
  20.     FullNoteHole12: TShape;
  21.     FullNoteHole13: TShape;
  22.     FullNoteHole2: TShape;
  23.     FullNoteHole3: TShape;
  24.     FullNoteHole4: TShape;
  25.     FullNoteHole5: TShape;
  26.     FullNoteHole6: TShape;
  27.     FullNoteHole7: TShape;
  28.     FullNoteHole8: TShape;
  29.     FullNoteHole9: TShape;
  30.     Image1: TImage;
  31.     Label1: TLabel;
  32.     Label2: TLabel;
  33.     Label3: TLabel;
  34.     Label4: TLabel;
  35.     Label5: TLabel;
  36.     Label6: TLabel;
  37.     Label7: TLabel;
  38.     Shape1: TShape;
  39.     FullNoteHole1: TShape;
  40.     Shape10: TShape;
  41.     Shape11: TShape;
  42.     Shape12: TShape;
  43.     Shape13: TShape;
  44.     Shape2: TShape;
  45.     Shape3: TShape;
  46.     Shape4: TShape;
  47.     Shape5: TShape;
  48.     Shape6: TShape;
  49.     Shape7: TShape;
  50.     Shape8: TShape;
  51.     Shape9: TShape;
  52.     procedure Button1Click(Sender: TObject);
  53.     procedure Button2Click(Sender: TObject);
  54.     procedure DBText1Click(Sender: TObject);
  55.     procedure FormCreate(Sender: TObject);
  56.     procedure Image1Click(Sender: TObject);
  57.     procedure Label2Click(Sender: TObject);
  58.     procedure Label3Click(Sender: TObject);
  59.     procedure Label5Click(Sender: TObject);
  60.     procedure Label6Click(Sender: TObject);
  61.     procedure Label7Click(Sender: TObject);
  62.     procedure Shape14ChangeBounds(Sender: TObject);
  63.     procedure Shape1ChangeBounds(Sender: TObject);
  64.     procedure Shape2ChangeBounds(Sender: TObject);
  65.     procedure FormKeyDown(Sender: TObject);
  66.   private
  67.  
  68.   public
  69.  
  70.   end;
  71.  
  72. var
  73.   Form1: TForm1;
  74.   X    : Integer;
  75.   n : integer;
  76.   Key: word;
  77. implementation
  78.  
  79. {$R *.lfm}
  80.  
  81. { TForm1 }
  82.  
  83. procedure TForm1.FormCreate(Sender: TObject);
  84. begin
  85.   randomize;
  86.   Form1.KeyPreview := True;
  87. end;
  88.  
  89.  
  90. procedure TForm1.Image1Click(Sender: TObject);
  91. begin
  92.  
  93. end;
  94.  
  95. procedure TForm1.Button1Click(Sender: TObject);
  96. begin
  97.   randomize;
  98.   X:=random(13);
  99.        If X=1 then
  100.        begin
  101.        Shape1.Visible:=True;
  102.        FullNoteHole1.Visible:=True;
  103.        Shape1.Brush.color:=clBlack;
  104.        end;
  105.  
  106.        If X=2 then
  107.        begin
  108.        Shape2.Visible:=True;
  109.        FullNoteHole2.Visible:=True;
  110.        Shape2.Brush.color:=clBlack;
  111.        end;
  112.  
  113.        If X=3 then
  114.        begin
  115.        Shape3.Visible:=True;
  116.        FullNoteHole3.Visible:=True;
  117.        Shape3.Brush.color:=clBlack;
  118.        end;
  119.  
  120.        If X=4 then
  121.        begin
  122.        Shape4.Visible:=True;
  123.        FullNoteHole4.Visible:=True;
  124.        Shape4.Brush.color:=clBlack;
  125.        end;
  126.  
  127.        If X=5 then
  128.        begin
  129.        Shape5.Visible:=True;
  130.        FullNoteHole5.Visible:=True;
  131.        Shape5.Brush.color:=clBlack;
  132.        end;
  133.  
  134.        If X=6 then
  135.        begin
  136.        Shape6.Visible:=True;
  137.        FullNoteHole6.Visible:=True;
  138.        Shape6.Brush.color:=clBlack;
  139.        end;
  140.  
  141.        If X=7 then
  142.        begin
  143.        Shape7.Visible:=True;
  144.        FullNoteHole7.Visible:=True;
  145.        Shape7.Brush.color:=clBlack;
  146.        end;
  147.  
  148.        If X=8 then
  149.        begin
  150.        Shape8.Visible:=True;
  151.        FullNoteHole8.Visible:=True;
  152.        Shape8.Brush.color:=clBlack;
  153.        end;
  154.  
  155.        If X=9 then
  156.        begin
  157.        Shape9.Visible:=True;
  158.        FullNoteHole9.Visible:=True;
  159.        Shape9.Brush.color:=clBlack;
  160.        end;
  161.  
  162.        If X=10 then
  163.        begin
  164.        Shape10.Visible:=True;
  165.        FullNoteHole10.Visible:=True;
  166.        Shape10.Brush.color:=clBlack;
  167.        end;
  168.  
  169.        If X=11 then
  170.        begin
  171.        Shape11.Visible:=True;
  172.        FullNoteHole11.Visible:=True;
  173.        Shape11.Brush.color:=clBlack;
  174.        end;
  175.                                                                                                                    
  176.  
  177.        If X=12 then
  178.        begin
  179.        Shape12.Visible:=True;
  180.        FullNoteHole12.Visible:=True;
  181.        Shape12.Brush.color:=clBlack;
  182.        end;
  183.  
  184.        If X=13 then
  185.        begin
  186.        Shape13.Visible:=True;
  187.        FullNoteHole13.Visible:=True;
  188.        Shape13.Brush.color:=clBlack;
  189.        end;
  190.  
  191. end;
  192.  
  193. procedure TForm1.Button2Click(Sender: TObject);
  194. begin
  195.        Shape1.Visible:=False;
  196.        FullNoteHole1.Visible:=False;
  197.        Shape1.Brush.color:=clMenu;
  198.        Shape2.Visible:=False;
  199.        FullNoteHole2.Visible:=False;
  200.        Shape2.Brush.color:=clMenu;
  201.               Shape3.Visible:=False;
  202.        FullNoteHole3.Visible:=False;
  203.        Shape3.Brush.color:=clMenu;
  204.               Shape4.Visible:=False;
  205.        FullNoteHole4.Visible:=False;
  206.        Shape4.Brush.color:=clMenu;
  207.               Shape5.Visible:=False;
  208.        FullNoteHole5.Visible:=False;
  209.        Shape5.Brush.color:=clMenu;
  210.               Shape6.Visible:=False;
  211.        FullNoteHole6.Visible:=False;
  212.        Shape6.Brush.color:=clMenu;
  213.               Shape7.Visible:=False;
  214.        FullNoteHole7.Visible:=False;
  215.        Shape7.Brush.color:=clMenu;
  216.               Shape8.Visible:=False;
  217.        FullNoteHole8.Visible:=False;
  218.        Shape8.Brush.color:=clMenu;
  219.               Shape9.Visible:=False;
  220.        FullNoteHole9.Visible:=False;
  221.        Shape9.Brush.color:=clMenu;
  222.               Shape10.Visible:=False;
  223.        FullNoteHole10.Visible:=False;
  224.        Shape10.Brush.color:=clMenu;
  225.               Shape11.Visible:=False;
  226.        FullNoteHole11.Visible:=False;
  227.        Shape11.Brush.color:=clMenu;
  228.               Shape12.Visible:=False;
  229.        FullNoteHole12.Visible:=False;
  230.        Shape12.Brush.color:=clMenu;
  231.               Shape12.Visible:=False;
  232.        FullNoteHole12.Visible:=False;
  233.        Shape12.Brush.color:=clMenu;
  234.               Shape13.Visible:=False;
  235.        FullNoteHole13.Visible:=False;
  236.        Shape13.Brush.color:=clMenu;
  237.  
  238. end;
  239.  
  240.  
  241.  
  242. procedure TForm1.DBText1Click(Sender: TObject);
  243. begin
  244.  
  245. end;
  246.  
  247.  
  248. procedure TForm1.Label2Click(Sender: TObject);
  249. begin
  250.  
  251. end;
  252.  
  253. procedure TForm1.Label3Click(Sender: TObject);
  254. begin
  255.  
  256. end;
  257.  
  258. procedure TForm1.Label5Click(Sender: TObject);
  259. begin
  260.  
  261. end;
  262.  
  263. procedure TForm1.Label6Click(Sender: TObject);
  264. begin
  265.  
  266. end;
  267.  
  268. procedure TForm1.Label7Click(Sender: TObject);
  269. begin
  270.  
  271. end;
  272.  
  273. procedure TForm1.Shape14ChangeBounds(Sender: TObject);
  274. begin
  275.  
  276. end;
  277.  
  278. procedure TForm1.Shape1ChangeBounds(Sender: TObject);
  279. begin
  280.  
  281. end;
  282.  
  283. procedure TForm1.Shape2ChangeBounds(Sender: TObject);
  284. begin
  285.  
  286. end;
  287.  
  288. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top