procedure TForm1.Button1Click(Sender: TObject);
var
DeskTop : TCanvas ;
begin
DeskTop := TCanvas.Create ;
try
with DeskTop do
Handle := GetWindowDC (GetDesktopWindow) ;
with Image1.Canvas do
CopyRect (Rect (0, 0, 200, 200),
DeskTop,
Rect (0, 0, 200, 200))
finally
DeskTop.Free
end
end;
|