I don't want user open many form2 so I use a private boolean variable. When the button is clicked, it call the function to check the bool variable, if false then show form 1 and set the bool variable to true. And form2 open, and that works to prevent user open many form
What about using ShowDialog()
instead of Show()
without using any variables it'll enforce user to not open more than 1 instance of form2