I have to create a usercontrol which could be dragged over the base form and could be resizable during run time.
Please help me out.

Recommended Answers

All 7 Replies

To make a user control dragable or moveble on your forum you should make it using 3 event handlers
1- on mouse click
2- on mouse move
3- on mouse release

first on mouse click begin assgining the location of the control to the x, y of mouse
once user release mouse on the control don't make the mouse x, y = to user control.
I've sample on my pc I've implemented I'll search for you..

Resizable would be the same thinking..

I have already done this but problem is mouse move event for usercontrol can't displace it with respect to parent form.

And do I assign the control the mouse positions?

use also the drag and drop method

To make a user control dragable or moveble on your forum you should make it using 3 event handlers
1- on mouse click
2- on mouse move
3- on mouse release

first on mouse click begin assgining the location of the control to the x, y of mouse
once user release mouse on the control don't make the mouse x, y = to user control.
I've sample on my pc I've implemented I'll search for you..

Resizable would be the same thinking..

Oh Ramy, it's a long time, how are you?

This is a document within it there is an use cases about the drag and drop controls and how to deal with this

I went back, I was busy last days with my conscription.. thanks for asking :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.