Category: Graphic
Title: Draw a bitmap on the desktop
Date added: 15.03.2006
Hits: 2076
procedure TForm1.Button1Click(Sender: TObject);
var
Picture: TPicture;
Desktop: TCanvas;
X, Y: Integer;
begin
Picture := TPicture.Create;
Desktop := TCanvas.Create;
Picture.LoadFromFile('bitmap1.bmp');
Desktop.Handle := GetWindowDC(0);
X := 100;
Y := 100;
Desktop.Draw(X, Y, Picture.Graphic);
ReleaseDC(0, Desktop.Handle);
Picture.Free;
Desktop.Free;
end;