Hey,
I am new to Visual Studio 2008 and c#. I am trying to combine projects in Visual Studio 2008. The code that I have used allows me to open the second form but it doesn't run. Can you help me?
The code for form1 is
private void button1_click(object sender, EventArgs e)
{
form form2 = new Form();
form2.show();
}
the code for form 2 is:
private void Form2_Load(object sender, EventArgs e)
{
MessageBox.Show("Does it work");
}
Loading
Tanmay SarkarPosted Aug 6, 2010, 11:47 AM
private void button1_click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.show();
}
And in Form2's code section write
private void Form2_Load(object sender, EventArgs e)
{
MessageBox.Show("Does it work");
}
As during loading first a message will pass then the form will appear to you!
I also upload a tiny sample.
Thank you!
Please mark it as an answer if it help you!
Tanmay SarkarPosted Aug 6, 2010, 12:26 PM
Nadine FordPosted Aug 6, 2010, 12:10 PM