StartPosition CenterParent?

E

Eric B.

I posted about this before but it is still bugging me.

I am creating an instance of form2 from my form1, and although I have the
StartPosition set to CenterParent for the form2 it is not appearing there.

private void preferencesToolStripMenuItem_Click(object sender,
EventArgs e)
{
Form_Preferences Preferences = new Form_Preferences();
this.AddOwnedForm(Preferences);
Preferences.Show();
}

Any ideas?

Eric B.
 
Z

zacks

I posted about this before but it is still bugging me.

I am creating an instance of form2 from my form1, and although I have the
StartPosition set to CenterParent for the form2 it is not appearing there..

        private void preferencesToolStripMenuItem_Click(object sender,
EventArgs e)
        {
            Form_Preferences Preferences = new Form_Preferences();
            this.AddOwnedForm(Preferences);
            Preferences.Show();
        }

Any ideas?

Eric B.

I had never even heard of the AddOwnedForm method, let alone used it.
And I show child forms that are centered to their parent all the time
with no problem.

Any time a form shows another form, it is automatically linked as the
parent of the child form, from my experiance.
 
J

Jeff Johnson

I had never even heard of the AddOwnedForm method, let alone used it.
And I show child forms that are centered to their parent all the time
with no problem.
Any time a form shows another form, it is automatically linked as the
parent of the child form, from my experiance.

There's a difference between a simple parent/child relationship and an
"owned form." An owned form always appears above its owner (kind of a
limited "always on top" scope) and is minimized when its owner is minimized.
Modeless dialogs like Find behave this way.
 
E

Eric B.

Jeff Johnson said:
I had never even heard of the AddOwnedForm method, let alone used it.
And I show child forms that are centered to their parent all the time
with no problem.
Any time a form shows another form, it is automatically linked as the
parent of the child form, from my experiance.

There's a difference between a simple parent/child relationship and an
"owned form." An owned form always appears above its owner (kind of a
limited "always on top" scope) and is minimized when its owner is
minimized. Modeless dialogs like Find behave this way.[/QUOTE]

Right. It made sense to me for both my Preferences and About forms.

Eric B.
 
J

Jeff Johnson

Right. It made sense to me for both my Preferences and About forms.

Really? I'd make both of those modal. And please, please, please, unless
you're writing something for graphics designers who've spent their entire
lives in Photoshop or Quark, call it Options, not Preferences. Preferences
is so...Mac.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top