private void timer3_Tick(object sender, EventArgs e)
 {
     if (c)
     {
         System.Environment.Exit(0);
     }
     else
     {
         login     l  = new login();
         home      h  = new home();
         datosUser du = new datosUser();
         int       i  = l.index;
         l.Dispose();
         Console.WriteLine(l.UsernameID);
         h.Show();
         this.Close();
     }
 }
        public viewCarga(type t)
        {
            InitializeComponent();

            color.Add(Color.FromArgb(104, 33, 122));
            color.Add(Color.FromArgb(42, 88, 173));
            color.Add(Color.FromArgb(255, 140, 0));
            color.Add(Color.FromArgb(213, 105, 0));

            progress.ProgressColor = color[pos];

            switch (t)
            {
            case type.inicio:
                txt.Add("Iniciando");
                txt.Add("Iniciando .");
                txt.Add("Iniciando . .");
                txt.Add("Iniciando . . .");
                break;

            case type.cerrar:
                txt.Add("Cerrando");
                txt.Add("Cerrando .");
                txt.Add("Cerrando . .");
                txt.Add("Cerrando . . .");

                c = true;

                datosUser du = new datosUser();


                break;
            }

            this.Show();
        }