mdi forms

T

thomasp

I have a vs2005 project that contains a mdi parent form that is opened with
the following code:


<STAThread()> _
Sub Main()
Application.Run(New frmMain())
End Sub

If I open a mdi child form from within frmMain with the following code:

Dim frmQ36Table As New frmViewTables
frmQ36Table.MdiParent = Me
frmQ36Table.Show()

it opens just fine.

if I attempt to open a mdi child form from within another child form using
the following code:

Dim Preview As New frmPreview
Preview.MdiParent = TAMS.frmMain
Preview.Show()

Will someone please tell me what I am doing wrong? This all worked before I
changed the frmMain to open using the "<STAThread()>". I have no idea what
this does, but it was the only way that I could get the 2 webrowser controls
on frmMain to work after I upgraded from VB2005Beta2 to VS2005 RC. Fixed
one problem broke created another....


Thanks,

Thomas
 
G

Guest

Thomas,

Since you are trying to open a child form from another child form, why don't
you just do:

Preview.MdiParent = Me.MdiParent

Kerry Moorman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top