otherside
Centurion
Ok guys here my problem and it's getting annoying.
The MDI Parent form
The Form2
This works fine when it's not inside an mdi parent
but when it does like this example i get the error
Can't call Close() while doing CreateHandle()
Any hints ? any Ideas why is this happening ? and also any solutions ?
And another one why i can't the the mdiparent to a dialog? i get the exception:
Forms that are not top level forms cannot be displayed as a modal dialog. Remove the form from any parent form before calling showDialog.
I understand what is says but why ?
is there any way to override this ?
The MDI Parent form
Code:
Private Sub MenuItem2_Click
Dim ma As New Form2()
ma.MdiParent = Me
ma.Show()
End Sub
The Form2
Code:
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ha As New Form3()
If ha.ShowDialog() = DialogResult.Cancel Then
Me.Close()
End If
End Sub
This works fine when it's not inside an mdi parent
but when it does like this example i get the error
Can't call Close() while doing CreateHandle()
Any hints ? any Ideas why is this happening ? and also any solutions ?
And another one why i can't the the mdiparent to a dialog? i get the exception:
Forms that are not top level forms cannot be displayed as a modal dialog. Remove the form from any parent form before calling showDialog.
I understand what is says but why ?
is there any way to override this ?