Click to See Complete Forum and Search --> : Problem with MDI Child forms


Chakradhar
July 26th, 1999, 08:02 AM
I have opened an MDI Form and then added an MDI child form to it. I am calling the MDI child form from a menu item on MDI form. When I am doing this the child form is displaying in the middle of the screen. I want it to be attached to the MDI tool bar. What are the properties do i need to set to achieve the task.


chakradhar





Software Engineer
IT Solutions India
Banagalore

Lothar Haensler
July 26th, 1999, 08:07 AM
I'm not sure what you mean by "attached to the menu", but you can code like this

me.Move 0, 0



in the Resize Event of your MDIChild to position your child right below the menu bar.

Ravi Kiran
July 26th, 1999, 08:49 PM
You can also set AutoShowChildern property of MDI Form to false. This will stop the child form from being shown when they are loaded. So after loading, set the Left and top in the MDI form's code itself. Something like this:

Load frmChild1
frmChild1.Move 0, 0
frmChild1.Show


"We cannot solve problems with the same thinking we used when we created them." - Einstein

Cana
August 1st, 1999, 09:00 PM
You have to set the Top Property of your MDI child
form.By default MDI child form will be attached to the top portion(near Menu) of MDI form.
If you have written some code to center the
form then you have to reduce the Value in the Top
property of the MDI child form in your code.