using MetroFramework.Forms; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using BillingSystem.Presentation; namespace BillingSystem.Presentation { public partial class frmMainMenu : MetroForm { public frmMainMenu() { InitializeComponent(); } public void LoadForm(MetroForm frm) { frm.MdiParent = this; frm.WindowState = FormWindowState.Maximized; frm.BringToFront(); frm.Show(); } private void frmMainMenu_Load(object sender, EventArgs e) { } private void metroButton2_Click(object sender, EventArgs e) { try { LoadForm(new frmAddInvoice()); this.WindowState = FormWindowState.Maximized; } catch (Exception ex) { MessageBox.Show(ex.Message); } } } }
frm.MdiParent = this; ... frm.TopLevel = true; frm.Show();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)