Window Refresh/Repaint Writing Persistant Graphics

I use the code similar to the following to write
a running graph of hard drive disk space use to the screen.

My problem is that each time another windows moves over my
form the contents of the panel are lost.

What changes do I need to make in order for the moving disk
space graph (pixels drawn) to remain after another windows
or dialog obsures them?

{*********************************************************}

var
  i,j,k     : integer;
  maxx,maxy : integer;
  Display   : TCanvas;

{*********************************************************}

  // position panel
  form1.panel1.height := 100;
  form1.panel1.width := 100;
  form1.panel1.top := 20;
  form1.panel1.left := 20;

  maxx := panel1.height;
  maxy := panel1.width;

  Display := TCanvas.Create;
  Display.handle:= GetDC(Panel1.handle);

  // draw random
  for k := 1 to 100 do
  begin
    i := random(form1.panel1.width);
    j := random(form1.panel1.height);
    display.pixels[i,j] := clgreen;
  end;

{********************************************************}

I have also tried using a paintbox

procedure TForm1.Button1Click(Sender: TObject);
var i,j : integer;
begin
  PaintBox1.Canvas.Create;
  for i := 0 to PaintBox1.Width - 1 do for j := 0 to PaintBox1.Height - 1 do
  PaintBox1.Canvas.Pixels[i,j] := clGreen;
for i := 1 to PaintBox1.Width - 1 do PaintBox1.Canvas.Pixels[i,0] := clRed;
for i := 1 to PaintBox1.Height - 1 do PaintBox1.Canvas.Pixels[0,i] := clRed;
end;

Same problem exibited when another window moves over the section the pixels

disappear