//---------------Forms responsaveis por carregar formularios no painel = pLoadForm private void carregarFormPrincipal(Principal obj) { //obj = new Principal(1); tlpBotoes.Visible = true; pLoadForm.Visible = true; this.IsMdiContainer = true; obj.MdiParent = this; obj.Visible = true; obj.WindowState = FormWindowState.Maximized; obj.StartPosition = FormStartPosition.CenterScreen; obj.Size = new System.Drawing.Size(pLoadForm.Size.Width, pLoadForm.Size.Height); pLoadForm.Controls.Add(obj); obj.Location = new Point(0, 0); this.IsMdiContainer = false; tlpBotoes.Visible = true; /*/ obj // ;= new Principal(1); this.IsMdiContainer = true; obj.MdiParent = this; obj.Visible = true; obj.WindowState = FormWindowState.Maximized; obj.StartPosition = FormStartPosition.CenterScreen; pFormLoadUp.Visible = false; obj.Size = new System.Drawing.Size(pLoadForm.Size.Width, pLoadForm.Size.Height); pLoadForm.Controls.Add(obj); obj.Location = new Point(0, 0); this.IsMdiContainer = false; tlpBotoes.Visible = true; /*/ }
public Fundo() { InitializeComponent(); { Abertura ab = new Abertura(); ab.ShowDialog(); cod_caixa = (short)ab.cod_caixa; if (cod_caixa == 0) { Application.Exit(); this.Close(); } else { obj = new Principal(cod_caixa, tlpBotoes); carregarFormPrincipal(obj); } } ordenarTamanhoBotoesCima(); tlpBotoes.Visible = true; }