> When dropping the item onto my Panel, I want it to appear at that point
on the Panel, and therefore need the mouse coordinates relative to the
Panel and not the form itself. Something like:
Do you have a reference to the form which is the source of the Drag
operation? I assume that the 'sender' parameter you are receiving is one?
private void myPanel_DragDrop( object sender, DrawEventArgs e )
{
Control source = ( Control )sender;
// Obtain screen location of drag event...
Point screen = source.PointToScreen( new Point( e.X, e.Y ) );
// And convert it to our local coordinate system...
Point local = PointToClient( screen );
}
Which should leave you with a location local to your panel inside the
'local' variable.
n!