Question: Need help with Visual Studio. I am trying to create a new window that pops up once a button is clicked but im running into
Need help with Visual Studio. I am trying to create a new window that pops up once a button is clicked but im running into issues with the new form that opens up. Below is the code. I watched a youtube video that doesnt allow me to create a new button the same way they can.
1.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace interface { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void onInfo1Click(object sender, EventArgs e) { hello_form hello = new hello_form(); hello.Show(); }
}
}
2.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace interface { public partial class hello_form : Form { public hello_form() { InitializeComponent(); }
private void hello_form_Load(object sender, EventArgs e) {
} } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
