First WinForm app with VS.Net 2005

E

Elmo Watson

I'm using the RC of VS.Net 2005 and I'm apparently missing something - (also
first time creating an app with VS.Net)

I have two forms:
frmMain (MDI)
frmEdit (set to isMDIcontainer=False)

I have the following code:

Dim f As New frmEdit
f.MdiParent = Me
f.Show()

However, when it runs, I get an error on the second line that a form cannot
be an MDI parent and and MDI child at the same time - -
I'm confused what am I missing?
 
H

Herfried K. Wagner [MVP]

Elmo Watson said:
I'm using the RC of VS.Net 2005 and I'm apparently missing something -
(also first time creating an app with VS.Net)

I have two forms:
frmMain (MDI)
frmEdit (set to isMDIcontainer=False)

I have the following code:

Dim f As New frmEdit
f.MdiParent = Me
f.Show()

However, when it runs, I get an error on the second line that a form
cannot be an MDI parent and and MDI child at the same time - -
I'm confused what am I missing?

Is the code placed in 'frmMain'? Is the main form's 'IsMdiContainer'
property set to 'True'?
 

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