I am clueless right now on how I can set the position of a form to open up directly below the parent form, as if the new form is attached directly below it's parent form. The parent form's property is currently set to start at the CenterScreen. I don't like to just ask for some script, but can anyone provide a direction or idea for me?

Recommended Answers

All 2 Replies

Between the instantiation of the child form and the call to the show you can set the top and the left properties of the form. The top would be approximately the sum of the top-of-the-parent- form and the height-of-the-parent-form.

I guess that the form's top and height are available, otherwise you need to pass it to the object/method that opens the child.

I guess you will do something similar with the left. If you keep everythign centered, you won't need to do anything.

Hope this helps.

Ok, I found a cheasy solution. Not the best approach, but since this program is being used in a so-called control enviornment(five laptops set the exact same way), I just figured out the x & y coordinates for where I want the child form and set it to open at that location, thus directly below the parent form.

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.