是在GetDc(0);上做图吗
procedure TForm1.Button1Click(Sender: TObject);
var
dc: hdc;
DeskCanvas: TCanvas;
i, j: Integer;
begin
dc := GetDc(0);
DeskCanvas := TCanvas.Create;
DeskCanvas.Handle := dc;
DeskCanvas.Pen.Color := clRed;
DeskCanvas.Pen.Width := 5;
j := 0;
while j < Screen.Height - 30 do
begin
MoveToEx(Dc, 0, j, nil);
LineTo(Dc, Screen.Width, Screen.Height - 30);
j := j + 3;
end;
ReleaseDc(0, Dc);
end;