I would like to make a form that, when opened, locks the user to only using that form until closed.
I see this done in many programs that have a “settings.” You open the new form and if you try to click back on the old one, the new one pops back up and makes a beeping sound.
And just wondering, what exactly is this called, just do I don’t have to reference it as a “Form that locks the main form”?
You need to use the ShowDialog method to do this. This will lock the parent form like your are wanting. Here is some sample code that will show you how to do this (all it does is check a
textbox‘s content in form2, which is shown as a modal dialog to prevent the parent form from being used:Sample code copied from here: http://msdn.microsoft.com/en-us/library/system.windows.forms.form.showdialog(v=vs.71).aspx