Jump to content

problem with switching windows in c#

- - - - -

  • Please log in to reply
2 replies to this topic

#1
poz

poz

    Newbie

  • Members
  • Pip
  • 1 posts
Good morning I am French, i have very difficult to speack english . I thank for your understand.
I have a problem for exchange between main form at other form.
When i hide the main form for go to the other form , and that i when new open the main form,
i don't know how make for become visible the main form .
Here is open source

I go to other form .

form1.ActiveForm.hide();
form2 f = new form2();
f.show();

and i when go to main form .

form2.close();
form1 f = new form1();
f.show();

it is possible a make to otherwise .

thank all

#2
PoOoZaQ

PoOoZaQ

    Newbie

  • Members
  • Pip
  • 3 posts
Why do you recreate the form again? It already exists all you have to do is show it again
form1.Show();

#3
GIT Solutions

GIT Solutions

    Newbie

  • Members
  • PipPip
  • 13 posts
Actually i didnt clear with your question but whatever i understand i will suggest you to go with further steps:
If you want to go from one form1 to another form2 and want to make the form1 hide you can use the the following code on first form1 of any button:
form2 f2 = new form2();
f2.show();
this.hide();
And if you you want to back to the form1 you can use the following code on form2 on af any button:
form1 f1 = new form1();
f1.show();
this.hide();




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users