Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
help please ..

QtN:i created several user controls and i added those controls to form at runtime.

controls are added but positions not changed .how we can changes those positions using mouse events like drag&Drop,move,... other events

i want those positions changes only runtime

if anyone know give ans.

regards&
thanks

venkat
Posted
Updated 20-Nov-10 4:45am
v3

1 solution

Change the Control.Location property.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.location.aspx[^]
Point oldLoc = MyControl.Location;
MyControl.Location = new Point(oldLoc.X + 10, oldLoc.Y + 10);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900