Drag, Drop and Dock Form to another form

G

Guest

Hi all i`m having a small problem with windows forms, i`m attempting to
provide the following functionality to a form.

Ability to drag and drop another form onto a form and then to dock this
form...

Quite a mouthful however a good example of this is within the VS.NET 6 IDE.
Grab your solution explorer panel and drop it outside of the IDE, then
drag/drop it back in and watch it dock.

I can achieve this using panels however im wondering if this is achievable
with whole forms.

Small side note I tried with setting the property Form.AllowDrop = true; and
then watching the events, mainly drag over, however no events are fired if
your moving one form over another. I`m guessing that its related to the form
im wishing to drop to being inactive?.

If anyone can help shed any light on this matter id be happy to hear from you.

Thanks
John.
 
S

Sean Hederman

zav said:
Hi all i`m having a small problem with windows forms, i`m attempting to
provide the following functionality to a form.

Ability to drag and drop another form onto a form and then to dock this
form...

This is very tricky and I suggest you have a look for third-party controls
to assist you.
Quite a mouthful however a good example of this is within the VS.NET 6
IDE.
Grab your solution explorer panel and drop it outside of the IDE, then
drag/drop it back in and watch it dock.

I can achieve this using panels however im wondering if this is achievable
with whole forms.

Small side note I tried with setting the property Form.AllowDrop = true;
and
then watching the events, mainly drag over, however no events are fired if
your moving one form over another. I`m guessing that its related to the
form
im wishing to drop to being inactive?.

No, it's related to the fact that forms aren't droppable objects.
 
G

Guest

Thank you sean, i did consider that however i'm looking to do this without
the use of third pary tools... Reason being most just use the panel technique
and you dont always get what you really want with 3rd party tools.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top