How to open a new form from another form

后端 未结 11 1677
太阳男子
太阳男子 2020-12-03 00:29

I have form which is opened using ShowDialog Method. In this form i have a Button called More. If we click on More it should open another form and it should close the curren

11条回答
  •  无人及你
    2020-12-03 01:15

    you may consider this example

    //Form1 Window
    //EventHandler
    Form1 frm2 = new Form1();
    {
        frm2.Show(this); //this will show Form2
        frm1.Hide();  //this Form will hide
    }
    

提交回复
热议问题