Click here to Skip to main content
15,882,412 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I had created one panel in run time and in that panel I had created a number of textboxes and a number of labels based on my algorithm.

Right now I am able to find the names of the particular textbox and labels but I am not able to move the text boxes and labels in run time

Please give me the solution
Updated 22-Aug-10 12:42pm
Dalek Dave 22-Aug-10 18:42pm    
Edited for Spelling and Grammar.

Change the controls' Location property.
Share this answer
Dalek Dave 22-Aug-10 18:42pm    
Good Call
tulasiram3975 23-Aug-10 0:16am    
i should move it along the mouse position
#realJSOP 23-Aug-10 6:09am    
Well then, you'd move the control in question while the mouse left-button is pressed. Just handle the appropriate event. This ain't rocket science.
1. If you create the textboxes and the labels in the panel, then you can move the panel directly rather than moving the textboxes and labels. Since the panel is a container control.

2. You can change the Location of panel to adapter to the mouse position, such as:

protected override void OnMouseMove(MouseEventArgs e)
    this.panel1.Location = new Point(e.X, e.Y);

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