Exemplo n.º 1
0
 public static frmSChild GetChildInstance()
 {
     if (m_SChildform == null) //if not created yet, Create an instance
     {
         m_SChildform = new frmSChild();
     }
     return(m_SChildform);  //just created or created earlier.Return it
 }
Exemplo n.º 2
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            frmSChild objfrmSChild = frmSChild.GetChildInstance();

            objfrmSChild.MdiParent = this;
            objfrmSChild.Show();
            objfrmSChild.BringToFront();
        }