jueves, 19 de marzo de 2015

Abrir un form y luego regresar al anterior C#



                   Hola esto es fácil solo pondremos en el botón para abrir la otra forma el siguiente código:


 objetoForm f2=new objetoForm();
this.Hide();
f2.ShowDialog();
this.Show;

Ejemplo:
  public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
              otraForma f = new otraForma();
               this.Hide();
               f.ShowDialog();
               this.Show();

        }

No hay comentarios:

Publicar un comentario