unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    ScrollBox1: TScrollBox;
    Image1: TImage;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var i: integer;
begin
  for i:=1 to 100 do
    Image1.Canvas.Pixels[Random(Image1.Width),
    Random(Image1.Height)]:=clWhite;
end;

procedure TForm1.Button2Click(Sender: TObject);
var i,k,t: integer;
begin
  for i:=1 to 100 do
  begin
   k:=Random(Image1.Width);
   t:=Random(Image1.Height);
   Image1.Canvas.Ellipse(k,t,k+10,t+10);
  end;
end;

end.
