public Inventory_Main() { InitializeComponent(); this.Visible = false; if (mainDashboard.IsDisposed == true) { mainDashboard = new Dashboardcs(); } this.Size = Screen.PrimaryScreen.WorkingArea.Size; mainDashboard.MdiParent = this; mainDashboard.Show(); //MessageBox.Show(Application.StartupPath.ToString() + "\\reports\\receipt.rpt"); //MessageBox.Show(System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName)); }
private void btnHome_Click(object sender, EventArgs e) { foreach (Form fm in this.MdiChildren) { fm.Close(); } if (mainDashboard.IsDisposed == true) { mainDashboard = new Dashboardcs(); } mainDashboard.MdiParent = this; mainDashboard.Show(); }