opening a window form from another form programmatically

后端 未结 6 1317
一整个雨季
一整个雨季 2021-01-01 12:03

I am making a Windows Forms application. I have a form. I want to open a new form at run time from the original form on a button click. And then close this

6条回答
  •  迷失自我
    2021-01-01 12:16

    private void btnchangerate_Click(object sender, EventArgs e)
        {
            this.Hide();  //current form will hide
            Form1 fm = new Form1(); //another form will open
            fm.Show();
    
    
        }
    

    on click btn current form will hide and new form will open

提交回复
热议问题