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, StdCtrls, ExtCtrls;
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Image1: TImage;
- Button2: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- a:array[1..10]of integer;
- b:integer;
- o:integer;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- randomize;
- for o:=1 to 10 do begin
- b:=random(50);
- Image1.Canvas.TextOut(10+o*20,10,inttostr(b));
- a[o]:=b;
- end;
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- Image1.Canvas
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment