943,703 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 8236
  • C# RSS
Mar 14th, 2008
0

How to create Dragable and Resizable control

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
saurabh singh is offline Offline
9 posts
since Feb 2005
Mar 14th, 2008
0

Re: How to create Dragable and Resizable control

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..
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Mar 14th, 2008
0

Re: How to create Dragable and Resizable control

I have already done this but problem is mouse move event for usercontrol can't displace it with respect to parent form.
Last edited by saurabh singh; Mar 14th, 2008 at 12:01 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
saurabh singh is offline Offline
9 posts
since Feb 2005
Apr 15th, 2008
0

Re: How to create Dragable and Resizable control

And do I assign the control the mouse positions?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
beni_dude is offline Offline
1 posts
since Apr 2008
Oct 30th, 2008
0

Re: How to create Dragable and Resizable control

use also the drag and drop method
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007
Oct 30th, 2008
0

Re: How to create Dragable and Resizable control

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?
Reputation Points: 11
Solved Threads: 16
Junior Poster
Jugortha is offline Offline
172 posts
since Oct 2007
Oct 30th, 2008
0

Re: How to create Dragable and Resizable control

This is a document within it there is an use cases about the drag and drop controls and how to deal with this
Attached Files
File Type: doc SampleApps_CSharp_DragDrop.doc (38.5 KB, 802 views)
Reputation Points: 11
Solved Threads: 16
Junior Poster
Jugortha is offline Offline
172 posts
since Oct 2007
Oct 31st, 2008
0

Re: How to create Dragable and Resizable control

I went back, I was busy last days with my conscription.. thanks for asking
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Best Practices for Code Organization
Next Thread in C# Forum Timeline: Passing a dynamic object to an array





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC