The story so far.
Application contains
Form1:TForm,
Image1:TImage,
Button1:TButton
both in Lazarus and in Delphi project.
In Lazarus project:
procedure TForm1.BitBtn1Click(Sender: TObject);
var
BMP : TBitmap;
begin
BMP := TBitmap.Create;
BMP.LoadFromClipboardFormat( CF_BITMAP );
Image1.Picture.Bitmap.Assign( BMP );
end;
In Delphi project:
procedure TForm1.Button1Click(Sender: TObject);
var
BMP : TBitmap;
begin
BMP := TBitmap.Create;
BMP.LoadFromClipboardFormat(CF_Bitmap, ClipBoard.GetAsHandle(CF_Bitmap), 0);
Image1.Picture.Bitmap.Assign( BMP );
end;
Then i copy part of image from MS Paint into clipboard.
After that, when i press "Button1" in Delphi project i see the same copied part of image on the form. When i press "Button1" in Lazarus project there nothing happens.
What i do wrong?