[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


Hello Reader, I have a doubt regarding one of the Start...

<< Back to: FAQ: (1/95) comp.lang.basic.visual.* General Frequently Asked Questions

Question by Newbie16
Submitted on 4/26/2004
Related FAQ: FAQ: (1/95) comp.lang.basic.visual.* General Frequently Asked Questions
Rating: Not yet rated Rate this question: Vote
Hello Reader,

I have a doubt regarding one of the Start Position properties and it is as follow ...

In my simple Windows Application there is a Form1.

I set the IsMdiContainer property to True.
I set the Size property to 600,600
I set the StartPosition property to CenterScreen.

I add another Form, Form2 to my project by right-clicking the project and clicking Add Item and click
Windows Form.

I then double click the MainMenu control in the toolbox to create a MainMenu Item.
I type in File and then add a menu item New which I double click and write an event handler as follows ...

Dim NewMDIChild As New Form2
'Set the Parent Form of the Child window.

NewMDIChild.MdiParent = Me

'Display the new form.

NewMDIChild.Show()

---------------------------------------------------------------------------------------------------

For the Form2, I set the properties as follows ...

StartPosition Property - CenterParent

Size : 300,300

I was expecting the Form2 to be displayed in the Center of Form1 which is the parent of Form2, but it was displayed in the right hand top corner where location is 0,0.

What is wrong and what am I missing here.

Thank you for your patience.

kind regards,

Newbie


Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: FAQ: (1/95) comp.lang.basic.visual.* General Frequently Asked Questions


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.