0
votes

I have a two project in a win application and I have utilize each others objects and controls via providing file reference to the project.

All are working very well but the Problem of set location of first project’s Forms into second project main forms. I mean If I have to decide showing position of first project forms into another than How to do the same?.

Working Between Projects

Project1                         project2
----------------------------------------------------
Contains many more forms and     Contains Just form1
Controls                         Which Is MDI   

Project2 is Starting Project Containing main Form.If I have done it by following In Project2 then.

private void bankMasterToolStripMenuItem_Click(object sender, EventArgs e)
{
    //bkmast is the forms of Invoice1's project OR Project1.
    INVOICE1.bkmast bm = new INVOICE1.bkmast(); 
    bm.Location = new Point(0, 50);
    bm.ShowDialog();
}

It’s not works well always showing different position of dialogs(forms). How to solve it or how to fix the location of particulars one forms of the first project into another?.

1
I have almost no idea what you're asking, unless you're saying that the default position of one form when it's in one project isn't the same as where you'd like it to be when used from the other?John Saunders
Thanks for editing. You should have shown this information when you first asked the question. Here's a hint: MDI isn't used much anymore. Any time you are asking about a problem involving MDI, you need to say so in the question, and use the mdi tag.John Saunders
Also, this problem probably has nothing to do with the fact that you have two different projects. Try this: add a simple child form to Project2 and try using it instead of INVOICE1.bkmast.John Saunders

1 Answers

0
votes

To choose the starting location of an mdi child, Call the show function first, then set the location.

ex.

Form1 form1 = new Form1();
form1.MdiParent = this;
form1.Show();
form1.Location = new Point(10,10);

this will show the child at the specified location.