Since you're moving the panel(position on parent control changes)you'll need to do a refresh on the parent. This will give correct visual effects but is even slower.
To boost things up, try the following:
* when you start moving
- Create a bitmap of the panelcontrol
- set visibility of the panel to false (no PerformLayouts on the parent)
- Create a bitmap of the parentcontrol (with the panel invisible)
- set a flag for special drawing mode
* In the OnPaint of the parent, build in a switch between normal painting and painting the movement (special drawing mode)
* When painting the movement (every mouseMovement):
- use the bitmaps to draw the canvas. This is a lot faster. You can even use clipping. Not the whole canvas will need a redraw.
* when the movement is about to finish:
- reset the flag
- set visibility of the panel back to true