[Solved] c# prevent duplicating forms [closed]
This should work (haven’t tested it though) public static bool _Invoked; Form2 f2 = new Form2(); private void button1_Click(object sender, EventArgs e) { if (!_Invoked) { _Invoked = true; f2.Show(); } else if (_Invoked) { f2.BringToFront(); _Invoked = false; } } Add a comment for further clarification EDIT: Just tested this and its working Form2 … Read more