positioning MDI Child windows

In my program, the MDI Child forms take a Cascading effect, when I load and show them.

To eliminate this, I use the following code in the MDI Child Form's Activate Event.
    me.top=0 '

But when the form is activated, it gives a moving effect (i.e), the form is displayed initially as cascading then it moves to the correct position.

But I want to place my forms without the moving effect, in the Center of my MDI Parent.

Can anybody help me??
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
Place your code in the Form_Load event instead of the Form_Activate event.
The source code to resource this problem ...

( On child form )
Private sub Form_Load()

   ' Ajust the form size and center this.
   Me.Width = 6500
   Me.Height = 4500
   CenterForm Me

End Sub

( On MDI Parent form )
Public Sub CenterForm(ByRef FormToCenter as Form )

   FormToCenter.Move ((Me.ScaleWidth - CenterToForm.Width) / 2), ((Me.ScaleHeight - CenterToForm.Height ) / 2 )
End Sub


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SRIVBAuthor Commented:
Thank you!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.