ok so im making a windows forms application in microsoft visual C# 2010. this is how i got it to change form:
page_2 page2 = new page_2();
page2.Visible = true;
this.Visible = false;
page2.SetDesktopLocation(50, 50);
the form its on is page_1 and its going to page_2. this works fine, the only problem is that all changes made to page_1 get removed and reset to default when using the same code to return from page_2. a friend of mine said to make page1 and page2 into global variables but i dont really know how to do that.
i found another topic on here asking about global variables and they said to put it in a static class but that didn't solve the problem, it wouldn't even work.
when i try using "page2.Visible = true" it says "page2 does not exist in the current context", im thinking that means i haven't told it where it is properly.