Graphic Delphi

procedure TForm1.Button1Click(Sender: TObject);
var dc : hdc;
Begin dc := GetDc(0);
MoveToEx(Dc, 0, 0, nil);
LineTo(Dc, 300, 300);
ReleaseDc(0, Dc);