OK - now you have created a new instance of a form...

The MainForm should be disabled:

MainForm.Enabled = False

After this you close the new instance created before and
then the MainForm should be re-enabled.