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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started