I have a program that when I click the "next" button, another window appears with the same form or other components appear.
I tried to add a panel on the main form with two buttons "home" and "next" and then a panel where you can see other forms to give the feeling that the page is changing. In the constructor I try to pass the previous form and the main one so that when clicked it returns to it with all its elements.
DesktopReserve formPadre;
DesktopPrincipal deskPrincipal;
public Form1(DesktopReserve formPadre, DesktopPrincipal deskPrincipal)
{
InitializeComponent();
this.formPadre = formPadre;
this.deskPrincipal = deskPrincipal;
this.deskPrincipal.returnButton.Click += new System.EventHandler(this.returnButton_Click);
}
I understand that this is not the best way to do it. Apart from the fact that when I show the different forms within this panel it shows in another size, I would like to know a more efficient way to execute this.