private void btnMessages_Click(object sender, EventArgs e) { if (windowactive) { Invoke(new Action(() => { tableLayoutPanel1.Visible = false; Chaat.remove_Thread_Dependency(network); frmChaat = Chaat.Instance; pnlFormL.Visible = true; pnlNav.Height = btnMessages.Height; pnlNav.Top = btnMessages.Top; btnMessages.BackColor = System.Drawing.Color.FromArgb(46, 51, 73); pnlNav.Show(); lblTitle.Text = "Messages"; this.pnlFormL.Controls.Clear(); frmChaat.FormBorderStyle = FormBorderStyle.None; frmChaat.TopLevel = false; this.pnlFormL.Controls.Add(frmChaat); frmChaat.Show(); })); } }
public Chatmoderator(Networking.Networking nv) { Chaat chatinstance = Chaat.Instance; InitializeComponent(); chatinstance.Dock = DockStyle.Fill; chatinstance.TopLevel = false; chatinstance.TopMost = true; pnlFormL.Visible = true; pnlNav.Show(); lblTitle.Text = "Messages"; this.pnlFormL.Controls.Clear(); frmHelp.FormBorderStyle = FormBorderStyle.None; this.pnlFormL.Controls.Add(chatinstance); chatinstance.Show(); network = nv; }