Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Size     = new Size(Screen.PrimaryScreen.WorkingArea.Size.Width, Screen.PrimaryScreen.WorkingArea.Size.Height);
            this.Location = new Point(0, 0);  //sobra si tienes la posición en el diseño
            Form fmr_logo = new logo();

            fmr_logo.MdiParent     = this;
            fmr_logo.StartPosition = FormStartPosition.CenterScreen;
            fmr_logo.Enabled       = false;
            fmr_logo.Show();

            pnl_Menu inicioSes = new pnl_Menu();

            inicioSes.FormClosed += new FormClosedEventHandler(form2_FormClosed);
            inicioSes.ShowDialog();
            inicioSes.TopMost = true;
            inicioSes.Activate();

            MdiClient ctlMDI;

            foreach (Control ctl in this.Controls)
            {
                try
                {
                    ctlMDI           = (MdiClient)ctl;
                    ctlMDI.BackColor = this.BackColor;
                }
                catch (InvalidCastException exc)
                {
                }
            }
        }
Beispiel #2
0
        private void PictureBox1_Click(object sender, EventArgs e)
        {
            this.Hide();
            pnl_Menu inicioSes = new pnl_Menu();

            inicioSes.FormClosed += new FormClosedEventHandler(form2_FormClosed);
            inicioSes.ShowDialog();
            inicioSes.TopMost = true;
            inicioSes.Activate();
        }
Beispiel #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            CapaDiseño_Opciones cd = new CapaDiseño_Opciones();
            Colores             cl = cd.obtenerColores();

            if (cl.ID.ToString() != "")
            {
                pct_Icono.BackColor       = Color.FromArgb(Convert.ToInt32(cl.BarraDeTitulo));
                pnl_barraTitulo.BackColor = Color.FromArgb(Convert.ToInt32(cl.BarraDeTitulo));
                menuStrip1.BackColor      = Color.FromArgb(Convert.ToInt32(cl.BarraDeMenu));
                pnl_Fecha.BackColor       = Color.FromArgb(Convert.ToInt32(cl.BarraDeEstado));
                pnl_Hora.BackColor        = Color.FromArgb(Convert.ToInt32(cl.BarraDeEstado));
                pnl_Usuario.BackColor     = Color.FromArgb(Convert.ToInt32(cl.BarraDeEstado));
            }
            this.BackColor = Color.FromArgb(Convert.ToInt32(cl.Fondo));
            MdiClient ctlMDI;

            foreach (Control ctl in this.Controls)
            {
                try
                {
                    ctlMDI           = (MdiClient)ctl;
                    ctlMDI.BackColor = this.BackColor;
                }
                catch (InvalidCastException exc)
                {
                }
            }
            this.pnl_DatosUsuario.Width    = this.Width;
            this.pnl_DatosUsuario.Location = new Point(0, this.Height - 25);
            this.pnl_Hora.Location         = new Point(this.Width - 500, 0);
            this.pnl_Usuario.Width         = this.Width - 500;
            this.pnl_Fecha.Location        = new Point(this.Width - 250, 0);
            this.btn_cerrar.Location       = new Point(this.Width - 35, 0);
            this.btn_minimizar.Location    = new Point(this.Width - 70, 0);
            this.ptb_logoEmpresa.Location  = new Point(2, this.Height - 177);
            pnl_Menu inicioSes = new pnl_Menu();

            //InicioSesionForm inicioSes = new InicioSesionForm();
            inicioSes.FormClosed += new FormClosedEventHandler(form2_FormClosed);
            inicioSes.ShowDialog();
            inicioSes.TopMost = true;
            inicioSes.Activate();
        }