MDI child form is moving down from it's parent 
Author Message
 MDI child form is moving down from it's parent

I have a MDI child form which seems to reposition itself below and to
the right of itself, each time it is invoked.

In other words, the first time it is .SHOWn it's great (i.e. abuts it's
MDI parent's toolbar).  Then after it's unloaded, the next time I
reenter it, it's .SHOWn "scooted" down and to the right.

I do not have a TOP property coded.  Also, the StartUpPosition says
0-Manual, but won't allow me to change this for a MDI Child form.
Should I be using a HIDE rather than an Unload Me?

I'm on VB 5.0

Thanks,
Gary



Mon, 05 Feb 2001 03:00:00 GMT  
 MDI child form is moving down from it's parent
I would simply place some positioning code in the forms load event.  


Tue, 06 Feb 2001 03:00:00 GMT  
 MDI child form is moving down from it's parent
Try something like this:

    MDIForm1.AutoShowChildren = False
    Form1.Left = 0
    Form1.Top = 0
    Form1.Show



Quote:
>I have a MDI child form which seems to reposition itself below and to
>the right of itself, each time it is invoked.

>In other words, the first time it is .SHOWn it's great (i.e. abuts it's
>MDI parent's toolbar).  Then after it's unloaded, the next time I
>reenter it, it's .SHOWn "scooted" down and to the right.

>I do not have a TOP property coded.  Also, the StartUpPosition says
>0-Manual, but won't allow me to change this for a MDI Child form.
>Should I be using a HIDE rather than an Unload Me?

>I'm on VB 5.0

>Thanks,
>Gary



Tue, 06 Feb 2001 03:00:00 GMT  
 MDI child form is moving down from it's parent

Quote:

>I have a MDI child form which seems to reposition itself below and to
>the right of itself, each time it is invoked.

>In other words, the first time it is .SHOWn it's great (i.e. abuts it's
>MDI parent's toolbar).  Then after it's unloaded, the next time I
>reenter it, it's .SHOWn "scooted" down and to the right.

>I do not have a TOP property coded.  Also, the StartUpPosition says
>0-Manual, but won't allow me to change this for a MDI Child form.
>Should I be using a HIDE rather than an Unload Me?

try to perform a Move 0,0 method which will place it in the upperleft corner
of the MDI parent window. (you can even specifie the Height and Width if you
want...)

Spell



Tue, 06 Feb 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help: Change a MDI child's parent MDI form at run-time

2. Move activex dll child on a MDI parent parent window

3. Modifying object in MDI Parent form from MDI Child form

4. Accessing Objects on a Mdi Parent form from a Mdi Child form

5. VB5: Crystal Reports child-window haven't title in MDI-parent form

6. Maximized MDI child form Covering Status bar on MDI parent

7. set the MDI parent of MDI child forms that are in a DLL

8. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

9. Loading MDI Child forms to a parent form from a DLL

10. Making a child form much bigger than the parent MDI form

11. Show a form - not as child - outside a MDI-parent form

12. Q: How do I move a child form in an MDI form

 

 
Powered by phpBB® Forum Software