Exemplo n.º 1
0
        private void Form_menu_Load(object sender, EventArgs e)
        {
            form_menu_button f0 = new form_menu_button()
            {
                Dock = DockStyle.Fill, TopLevel = false, TopMost = true
            };

            f0.FormBorderStyle = FormBorderStyle.None;
            this.pnl_menu.Controls.Add(f0);
            f0.Show();
            timer1.Start();
            lbl_date.Text      = DateTime.Now.ToString("yyyy/MM/dd");
            lbl_time.Text      = DateTime.Now.ToLongTimeString();
            lbl_name_menu.Text = "";
        }
Exemplo n.º 2
0
        private void btn_close_prod_inst_Click(object sender, EventArgs e)
        {
            ((Form_menu)Application.OpenForms["Form_menu"]).lbl_name_menu.Text = "";
            Panel p = this.Parent as Panel;

            if (p != null)
            {
                form_menu_button f0 = new form_menu_button()
                {
                    Dock = DockStyle.Fill, TopLevel = false, TopMost = true
                };
                f0.FormBorderStyle = FormBorderStyle.None;
                p.Controls.Add(f0);
                f0.Show();
                this.Close();
            }
        }