hello. i am new to programming in C# and i'm having trouble positioning a modal form. i basically have a main form (frmFormA) set as a mdi parent, then a button is pressed on frmFormA and i open another form (frmFormB) at a particular location. frmFormB is opened up as follows:
FormB = new frmFormB();
FormB.MdiParent = this;
FormB.Show();
Now from frmFormB, a button is pressed and i want to open another form, but i want it to require the user to do something before it can close. So I am opening it like this:
FormC = new frmFormB();
FormC.ShowDialo g();
When i do this, FormC doesn't go exactly on top of FormB. It is slightly higher and to the left even though i'm setting it to the same position as FormB. If i change my code to open FormC the same way as I open FormB, it places FormC where i want it.
I hope i have explained my problem clearly. If not, please let me know. I am using Visual Studio 2008 with the 3.5 framework. Can anyone tell me how to get past this? Thanks.
FormB = new frmFormB();
FormB.MdiParent = this;
FormB.Show();
Now from frmFormB, a button is pressed and i want to open another form, but i want it to require the user to do something before it can close. So I am opening it like this:
FormC = new frmFormB();
FormC.ShowDialo g();
When i do this, FormC doesn't go exactly on top of FormB. It is slightly higher and to the left even though i'm setting it to the same position as FormB. If i change my code to open FormC the same way as I open FormB, it places FormC where i want it.
I hope i have explained my problem clearly. If not, please let me know. I am using Visual Studio 2008 with the 3.5 framework. Can anyone tell me how to get past this? Thanks.
Comment