0
namespace TesteAbertura
{
public partial class FormularioTeste : Form
{
public FormularioTeste()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
Form1 f = new Form1();
f.TopLevel = false;
panel1.Controls.Add(f);
f.Show();
}
private void button2_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
Form2 f = new Form2();
f.TopLevel = false;
panel1.Controls.Add(f);
f.Show();
}
I don’t understand ...?
– novic
In each of the forms has a text box that I type something, when I click on the button to change to Form2 what was typed in the Form1 text box disappears, I want to remain what was typed in the text boxes of both forms.
– Marcio Valerio
Don’t just take that
panel1.Controls.Clear()
?– Jéf Bueno
Linq take Panel1.Controls.Clear() does not solve.
– Marcio Valerio