how to show windows form1 to windows form2.
if i am in form1 in that i have button like "OK" if click ok it need show form2. how to give this?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Keyur PatelPosted Mar 23, 2015, 3:32 AM
You can do it as shown in following code. Hope , it would help to you.
Reference link : https://msdn.microsoft.com/en-us/library/ws1btzy8(v=vs.90).aspx
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnOk_Click(object sender, EventArgs e)
{
Form2 frm2 = new Form2();
frm2.Show();
this.Hide();
}
}
Khargesh RajputPosted Mar 23, 2015, 3:31 AM
form2 frm=new form2();
frm.show():
Durga VelusamyPosted Mar 23, 2015, 4:57 AM