Dragging and dropping onto a form with many controls

  • Thread starter Thread starter Mark Ingram
  • Start date Start date
M

Mark Ingram

Hi, I want to be able to drag and drop some files onto my application
but it is only possible to drop at a location where I have no child
controls.

e.g. If i have a form with a textbox on it, I want to be able to drop
the files anywhere, but currently I can't drop them on to the textbox
itself. Is there a quick way I can get around this (I *dont* want to add
in the drag / drop code for all the controls on my form - as i have far
too many).

Any help much appreciated,

Thanks
 
Couldn't you simply wire up the same eventhandler for all of your child
controls. This way you could use the same code to handle the drop.
You could loop through all of controls and wire up the events on the
fly. Just a suggestion although I will admit that this is not an area
I have a lot of experience with.
 
Gozirra said:
Couldn't you simply wire up the same eventhandler for all of your child
controls. This way you could use the same code to handle the drop.
You could loop through all of controls and wire up the events on the
fly. Just a suggestion although I will admit that this is not an area
I have a lot of experience with.

Yeah, that's what I've had to do, I was hoping for a smoother method
than that :-/

Cheers,
 
Back
Top