I currently have a form that is declared as NewMDIChild = frm1. Within frm1 i open a new form that is about 1/3 of the size of frm1 - this forms name is frmX. This is how I open it....
Me.Enabled = False
'Pass globals to be used in search query
Dim frmX As New FrmX()
Once the form is disabled, most (if not all) the events are not going to fire. The next line to execute will be anything after the
ShowDialog() so you can enable it there:
Me.Enabled = False Using dlg As New FrmX dlg.ShowDialog() End Using Me.Enabled = True
Note that when a form is shown using
ShowDialog() it is not automatically disposed, so the code uses a
Using block to do so.