private void showManageSupplier() { //Create Only One Instance of Form frmManageSupplier f = frmManageSupplier.CreateInstance(); f.MdiParent = this; f.dataGrid.Width = Width - (imgAd.Width + 35); showManaged(f); showToolbars(new bool[] { true, true, true, true, true }); }
//this will create a single instance of form public static frmManageSupplier CreateInstance() { frmManageSupplier f; if (thisform == null) { thisform = new frmManageSupplier(); } //dynamic casting f = (frmManageSupplier)thisform; return(f); }