Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#16

Re: Was kann Paint, was ich nicht kann? ( Clipboard pasten )

  Alt 30. Aug 2006, 20:49
Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var pic: TPicture;
    h: HBITMAP;
begin
  pic := TPicture.Create;

  if Clipboard.HasFormat(CF_BITMAP) then
    begin
      h := Clipboard.GetAsHandle(CF_BITMAP);
      Pic.Bitmap.LoadFromClipboardFormat(CF_BITMAP,h,CF_PALETTE);
    end
  else
   Exit;

  Image1.Picture := Pic;
  pic.Free;
end;
Also DAS funktioniert bei mir!

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat