using System; using System.Drawing; using System.Windows.Forms; using FontAwesome.Sharp; namespace ModernUIApp.Forms { public partial class MainForm : Form { private IconButton currentBtn; private Panel leftBorderBtn; private Color currentColor; private Form currentChildForm; public MainForm() { InitializeComponent(); leftBorderBtn = new Panel(); leftBorderBtn.Size = new Size(7, 40); //panel5.Controls.Add(leftBorderBtn); //Form this.Text = string.Empty; this.ControlBox = false; this.DoubleBuffered = true; this.MaximizedBounds = Screen.FromHandle(this.Handle).WorkingArea; } //Methods private void OpenChildForm(Form childForm) { if (currentChildForm != null) { currentChildForm.Close(); } currentChildForm = childForm; childForm.TopLevel = false; childForm.FormBorderStyle = FormBorderStyle.None; childForm.Dock = DockStyle.Fill; // childForm.Font.Size = 10 pnlDesktop.Controls.Add(childForm); pnlDesktop.Tag = childForm; childForm.BringToFront(); childForm.Show(); } private void button1_Click(object sender, EventArgs e) { //ActivateButton(sender, RGBColors.color2); OpenChildForm(new ConferencesForm()); } } }
pnlDesktop.Controls.Add(childForm)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)