unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, Windows;
const
MY_MESSAGE = WM_USER + 1;
type
{ TForm1 }
TForm1 =
class(TForm)
Image1: TImage;
Image2: TImage;
Label1: TLabel;
procedure FormShow(Sender: TObject);
private
{ private declarations }
procedure MyMessage(
Var MSG: TMessage);
message MY_MESSAGE;
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
begin
PostMessage(Self.Handle, MY_MESSAGE, 0, 0);
end;
procedure TForm1.MyMessage(
var MSG: TMessage);
var
Quelle, Ziel: TRect;
begin
Label1.Caption := '
Luluu';
Quelle := Classes.Rect(0, 0, 100, 100);
Ziel := Classes.Rect(0, 0, 100, 100);
Image2.Canvas.CopyRect(Ziel, Image1.Canvas, Quelle);
end;
end.