Thank you, I will answer myself
Delphi-Quellcode:
var
FrmMain: TFrmMain;
MouseDownPos: TPoint;
DragEnabled : Boolean;
implementation
{$R *.fmx}
procedure TFrmMain.Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
MouseDownPos.X := Round(X);
MouseDownPos.Y := Round(Y);
DragEnabled := True;
end;
procedure TFrmMain.Label1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
begin
if DragEnabled then
begin
Label1.Position.X := Label1.Position.X + (X - MouseDownPos.X);
Label1.Position.Y := Label1.Position.Y + (Y - MouseDownPos.Y);
end;
end;
procedure TFrmMain.Label1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
if DragEnabled then
begin
Label1.Position.X := Label1.Position.X + (X - MouseDownPos.X);
Label1.Position.Y := Label1.Position.Y + (Y - MouseDownPos.Y);
end;
end;