mjb3030 Posted November 19, 2003 Posted November 19, 2003 Why is it that when I have a parent form and I try to align a child form to its right edge, it overlaps by a few pixels and I get a horizontal scroll bar? I am aligning it in this way: frmChild.location = new point(frmParent.clientsize.width - frmChild.width , 0) That should put it in the upper left corner. It does, but it overlaps the edge and gives me a horizontal scrollbar in the parent form. So, I wind up having to subtract a few pixels from the LEFT coordinate in order to make it fit properly. Am I doing something wrong? Quote
mjb3030 Posted November 19, 2003 Author Posted November 19, 2003 Correction... I meant that should put it in the upper right corner. Quote
*Experts* Volte Posted November 19, 2003 *Experts* Posted November 19, 2003 You need to take into account the border. frmChild.location = New point(frmParent.clientsize.width - frmChild.width - (SystemInformation.BorderSize.Width * 4), 0) Quote
mjb3030 Posted November 19, 2003 Author Posted November 19, 2003 Thank you. Why is it that you multiply that by 4? Quote
*Experts* Volte Posted November 19, 2003 *Experts* Posted November 19, 2003 One for each vertical border - two on the MDI form, two on the child form. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.