S
sklett
I thought this would be easy. I want to position a login form based on
whether or not it has a parent form, so I tried this:
<code>
if (ParentForm == null)
{
StartPosition = FormStartPosition.CenterScreen;
}
else
{
StartPosition = FormStartPosition.CenterParent;
}
</code>
I tried adding this in the following places:
- constructor
- Shown
- Load
It doesn't seem to have any effect. I'm thinking that it's not happening
*soon* enough, but I don't know how to catch it sooner than the constructor.
Any ideas?
whether or not it has a parent form, so I tried this:
<code>
if (ParentForm == null)
{
StartPosition = FormStartPosition.CenterScreen;
}
else
{
StartPosition = FormStartPosition.CenterParent;
}
</code>
I tried adding this in the following places:
- constructor
- Shown
- Load
It doesn't seem to have any effect. I'm thinking that it's not happening
*soon* enough, but I don't know how to catch it sooner than the constructor.
Any ideas?