Drag Drop question

  • Thread starter Thread starter Kevin L
  • Start date Start date
K

Kevin L

I have a Panel control that I currently allow the user to drag and
reposition on a form at runtime.
This Panel control contains a Label control.

I would like to allow the user to drag the PANEL by clicking on the LABEL
and dragging.

Is there a way to do this?
 
I found a way to accomplish what I wanted.
If anyone is interested:

1 - I modified the Handles statement on my Panel's Mousedown event to handle
the Mousedown Event of my label
2 - When the MouseDown event is fired, I first check to see if the Sender is
a label control, if yes, I change the value of SENDER to the label's Parent
control which is the Panel.

The rest of the Drag Drop code in the event handles the drag drop as it had
before. This allows the user to click on the label and drag the panel.
 
Back
Top