I like to create a smooth slowing scroll effect after panning an image in a scrollbox. Just like panning the map in maps.google.com. I\'m not sure what type it is, but exact
In the MouseClickDown event save the X and Y coordinate of mouse cursor in some global variable.
In the MouseMove event calculate the DeltaX = SavedX - CurrentX and the DeltaY = SavedY - CurrentY values.
Then scroll your map/image/panel by DeltaX/DeltaY as an absolute value respect your map/image/panel starting position.
In the MouseClickUp event, use the last calculated DeltaX and DeltaY to set the new starting position of your map/image/panel (essentially leaving it where it is) and reset the SavedX and SavedY values.
You'll need to check for maximum scrolling position, for border, for what happen when the mouse cursor go outside the application....