How can I position a subform based on the position of a control in the parent form. I realize I can set the start up position of the subform to manual and assign values to the location property manually.
But what i want to do is position the subform just above a control on the main form.
All this has to be done during runtime ofcourse.
Any help appreciated.
I am using Csharp and working on a Winform application on visual studio 2008, .net 3.5 sp1.
Here’s code that does it:
The loc variable will contain the screen coordinates of the control, and you can set your child form’s location to this.
EDIT: this, by the way, is the parent form in the above code