Maybe I did not set up my test program correctly, but for me there is only a single point at the top-left corner of the form (It would be better if you'd post a compilable project instead of a code snippet, this avoids any misunderstandings).
I do get a form full of points when I
- use the form's width and height instead of the Canvas width/height. In fact, I was not even aware that the canvas has a width and a height, I always thought that it is "infinite" - maybe it is the size of the clip rect?
- force repainting of the form by calling Invalidate at the end of the button-click procedure.
procedure TForm1.Button1Click(Sender: TObject);
var
px:integer;
py:integer;
i:integer;
begin
i := 0;
while i < MAX_POINTS do
begin
px := random(Width); //random(Canvas.Width); <-- replaced
py := random(Height); //random(Canvas.Height);
Points[i].x := px;
Points[i].y := py;
i := i + 1;
end;
Invalidate; // <--- added
end;