How to open a new form from another form

后端 未结 11 1647
太阳男子
太阳男子 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:25

    Try this..

    //button1 will be clicked to open a new form
    private void button1_Click(object sender, EventArgs e)
    {
        this.Visible = false;     // this = is the current form
        SignUp s = new SignUp();  //SignUp is the name of  my other form
        s.Visible = true;
    }
    

提交回复
热议问题