Implementing Drag/Drop onto empty MDI Document Area

Docking/MDI for Windows Forms Forum

Posted 18 years ago by Marianne
When nothing is in a tabbed MDI area I would like to be able to drag a file onto the surface of it and respond via standard OLE drag/drop. My attempts so far have failed and I looked in the sample app but don't see it implemented in there either. What I'm doing is:
            dm.TabbedMdiRootContainer.AllowDrop = true;
            dm.TabbedMdiRootContainer.DragDrop += new DragEventHandler(TabbedMdiRootContainer_DragDrop);
I'm assuming that the TabbedMdiRootContainer is what I want to use but am not entirely positive. Please advise.

------------------------------- Marianne

Comments (2)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
All you're missing is a DragOver handler. You need to set its event arg's Effect in that. I was able to do drag/drop after adding that.

Actipro Software Support

Posted 18 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
It would be more efficient to use the 'DragEnter' event instead of 'DragOver', and it will work the same. DragEnter will only be fired once when the cursor moves over the control, while DragOver constantly fires as the mouse moves.

You would only want to use DragOver if you needed to respond differently for different areas within your control.

Just thought I'd throw that in :)
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.