G
Guest
Hello All,
Having an issue with setting the MDIParent of a new form.
I have a form called CMIMain. From this form a child form is opened called
Form1.
This is the code I use to set that up:
Dim Form1 As New Form1
Form1.MdiParent = Me
Form1.Show()
Now, from Form1 I want to open another form called Form2, and I want CMIMain
to be the parent of Form2 as well. I thought this code would work, but it
does not:
Dim Form2 As New Form2
Form2.MdiParent = CMIMain
Form2.Show()
The error I am getting says " 'CMIMain' is a type and cannot be used as an
expression"
Any suggestions?
Thanks!
Having an issue with setting the MDIParent of a new form.
I have a form called CMIMain. From this form a child form is opened called
Form1.
This is the code I use to set that up:
Dim Form1 As New Form1
Form1.MdiParent = Me
Form1.Show()
Now, from Form1 I want to open another form called Form2, and I want CMIMain
to be the parent of Form2 as well. I thought this code would work, but it
does not:
Dim Form2 As New Form2
Form2.MdiParent = CMIMain
Form2.Show()
The error I am getting says " 'CMIMain' is a type and cannot be used as an
expression"
Any suggestions?
Thanks!