This is my first question so I hope I am doing this right. I am currently using Visual Studio Express 2017 doing a C# Windows Forms App project.
I have searched through Stack Overflow and YouTube for a similar examples but could find none. In the image attached, I have 3 forms in the project. Form1 which is the main controlling form and has 2 buttons on it. Form2button for Form2 and Form3button for Form3. When I click From2button, I can keep clicking and open multiple Form2's as well open multiple Form3's without limitations. I would like to run the program that if I click on Form2button it can only load one instance of Form2 and the same with Form3button.
namespace MultiWindows{ public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void Form2button_Click(object sender, EventArgs e){Form2 f2 = new Form2();f2.Show();}private void Form3Button_Click(object sender, EventArgs e){Form3 f3 = new Form3();f3.Show();}}}

Jaish MathewsRank #225 · 11K reputationPosted Sep 8, 2018, 9:22 AM EDT
Jaish MathewsRank #225 · 11K reputationPosted Sep 8, 2018, 10:54 AM EDT
Suraj KumarRank #353 · 7.1K reputationPosted Sep 8, 2018, 9:12 AM EDT
Garth Edmunds22 reputationPosted Sep 8, 2018, 10:22 AM EDT