Menu in MDIChild form not possible?

G

Guest

I am making my first windows mdi application. It seems like I cannot add a
mainmemu to the mdichild form. The mainmenu can be transferred from the
toolbox to the windows form in designmode, but it will not display. Is there
a limitation or do I have to do some additional steps to display the menu?

Regards

Tore G.
 
B

Bernie Yaeger

Hi Tore,

It does appear, but in an mdi app, what happens is the menu items
automatically appear as additional options on the main menu. I do not know
if it is possible to override this behavior.

HTH,

Bernie Yaeger
 
B

Bernie Yaeger

Hi Tore,

Found out a little more - if you make the form an mdi container (set this
property to true), you will have the menu on the form itself. However, this
cannot also be an mdi child at the same time, so it will be opened as its
own mdi container and opening it requires code like this:
Dim newmdichild As New buttonstest

'newmdichild.MdiParent = Me

newmdichild.Show()

You will note that defining it as an mdi child has been commented out - a
form cannot be both a child and an mdi container at the same time.

HTH,

Bernie
 
G

Guest

What I would like to do is to add some type of menu system to a mdi child
form. I have now tried to add a toolbar and toolbarbutton and I have set the
style to DropDownButton. It seems like this button will display a contextmenu
as it s dropdownmenu, but the toolbarbutton itself will not display its text
property. For test puposes I have added a toolbar and toolbarbuttons to a
form that is not a MDI child. In this case the toolbarbutton.text property is
shown as expected. Am I doing something wrong here, or is there a limitation
to the use of toolbarbuttons on MDI child forms? Why will the text not
display?

Regards

Tore G.
 
B

Bernie Yaeger

Hi Tore,

I read the article but I'm still confused. Yes, I can use mergetype to
avoid adding the menu to the main menu, but if the child is designated as a
child
Dim newmdichild As New buttonstest

newmdichild.MdiParent = Me

newmdichild.Show()

The menu doesn't appear anywhere. It's there if the child is not a child,
but that's not what we want.

Any ideas? Did I miss something?

Bernie
 

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