Move to a next window after pressing a button

Hi,

Basically, the title says it all.

How can i move to a next window after pressing a button.

I'm trying to make a calculator.

Thanks in advance!



Answer this question

Move to a next window after pressing a button

  • overthetop

    well, if I undrestand correctly, you wish to open another window in your application correct (another form) if so, simply create an instance of it and show it to the user. Example:

    Form2 theSecondForm = new Form2();

    theSecondForm.Show();

    //or:

    theSecondForm.ShowDialog();

    the showdialog() puts the form in question into the model dialog meaning that the previous forms opened are not accessible until this form is closed and only then can you access the other forms as well as continuing execution of code.

    Is this what you are after



  • Bala_SSRS

    Hi,

    Never mind, i think i got it.

    I'll just make the labels variable and display them.

    Thanks again!

  • Jamie Briant

    Hi,

    In my application.


  • Seshagiri


    Hi,

    Thanks for your reply.

    If i do it that way, does that mean i have to make another project in order to get the second form

    Or can i make a second form in the same project

    Thanks in advance!

  • leo landry

    you can add another form in the same project :-) just right click your project, go to add > new item and select the Form you want to add

  • HumbleServant

    not quite sure I understand...can you explain further you can use as many forms as you want in the project, thats no problem.



  • Scott Chang

    Hi,

    I just found it, thanks!

  • Sarah21

    I do have another question thought. Hope you can help me wit this one too.

    I have 4 kinds of computations in my calculator project. plus, minus, multiply and devide sums. And each time one of them will be displayed.

    How can i make the second form variable about what to display

    Or am i forced to use 4 forms for this project

    Thanks in advance!

  • bishoycom

    next Window in where your application or in the C# IDE Can you explain a bit more please

  • Move to a next window after pressing a button