Creating a Instance in a Form
Just create a variable of a Form
First
Create a MDI Form and a Form1.
In Form 1 write This code
private static Form1 sForm = null; public static Form1 Instance() { if (sForm == null) { sForm = new Form1 (); } return sForm; } protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); sForm = null; }
and In mdi Form write This code
Form sForm = new Form1.Instance(); sForm.MdiParent=this; sForm.show(); sForm.Activate(); Example 2: -Create a MDI Form and a Form1. *Write this codes at your MDI Form: //Create a variable: private Form1 frm1 = new Form1(); //Button showing a Form1: frm1.MdiParent=this; frm1.show();