拖放很简单,参照下面这个就行:
procedure TfmTest.FormDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
if Source is TImage then begin
TImage(Source).Left := x - TImage(Source).Width div 2;
TImage(Source).Top := y - TImage(Source).Height div 2;
end;
end;
procedure TfmTest.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if ssShift in (Shift) then ShowMessage('按下了shift!')
else if Not CheckBox1.Checked then Image1.BeginDrag(false)
end;
procedure TfmTest.FormDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
if (Source is TImage) then Accept := true;
end;
至于改变大小,我再看看吧