Hola aguml.
Según creo entender de tu mensaje, el movimiento de la imágen debe producirse dentro de los límites del
TScrollBox.
Entonces, si interpreté bién, podes hacer:
Código:
TPoint PIni;
void __fastcall TForm1::Image1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (Shift.Contains(ssCtrl)) { /* ¿ Tecla Ctrl presionada ? */
PIni.x = X;
PIni.y = Y;
Image1->BeginDrag(true);
}
}
void __fastcall TForm1::ScrollBox1DragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept)
{
Accept = Source->ClassNameIs("TImage");
}
void __fastcall TForm1::ScrollBox1DragDrop(TObject *Sender,
TObject *Source, int X, int Y)
{
Image1->Left = X - PIni.x;
Image1->Top = Y - PIni.y;
}
Saludos.