By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,275 Members | 947 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,275 IT Pros & Developers. It's quick & easy.

How to prevent automatic menu merge in MDI

P: n/a
Hello,

In an MDI application how can I prevent the CLR automatically merging a
child windows' menu with that of the parent MDI form ?

Thanks for any help

Jon

Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Jon,
I'm not sure if you can prevent the merge itself, however I would expect you
can mask the effect of the merge by using MenuMerge.Remove or
MenuMerge.Replace for the MenuItem.MergeType. Of course you could simply not
add a menu to the MDI child then the merge naturally will not occur. Somehow
I do not think this is what you mean ;-)

Which raises two questions:
- Why do you want to prevent it?
- What you are expecting instead?

The reason I ask, there may be 'better' alternatives rather then preventing
the merging.

Hope this helps
Jay

"jon morgan" <jo********@ntlworld.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,

In an MDI application how can I prevent the CLR automatically merging a
child windows' menu with that of the parent MDI form ?

Thanks for any help

Jon

Nov 20 '05 #2

P: n/a
Thanks Jay,

I'm implementing various child windows (egPrintPreview) where the user would
expect to see an approriate menu attached to the child and not the parent.
It just wasn't an issue in VB6 and much as I can see the power of menu merge
I don't see why we shouldn't have the option to "turn it off".

Regards

Jon

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:ue**************@TK2MSFTNGP09.phx.gbl...
Jon,
I'm not sure if you can prevent the merge itself, however I would expect you can mask the effect of the merge by using MenuMerge.Remove or
MenuMerge.Replace for the MenuItem.MergeType. Of course you could simply not add a menu to the MDI child then the merge naturally will not occur. Somehow I do not think this is what you mean ;-)

Which raises two questions:
- Why do you want to prevent it?
- What you are expecting instead?

The reason I ask, there may be 'better' alternatives rather then preventing the merging.

Hope this helps
Jay

"jon morgan" <jo********@ntlworld.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,

In an MDI application how can I prevent the CLR automatically merging a
child windows' menu with that of the parent MDI form ?

Thanks for any help

Jon


Nov 20 '05 #3

P: n/a
Jon,
I'm implementing various child windows (egPrintPreview) where the user would expect to see an approriate menu attached to the child and not the parent. Don't make the form a MDI child then.

The Windows Standard is to have a single menu in the MDI Parent. The
framework adheres to this standard. As far as I can tell VB6 also adheres to
this standard. (when working with MDI Forms & MDI children).

In VB6 the only option I see is to replace the MDI parent menu. Where as
VB.NET allows you to merge the menu with the parent, which is significantly
more flexible. The parent has common options, the child has child specific
options. In both cases this menu is displayed as part of the MDI parent.

Have you looked at either using Form.ShowDialog(owner) to show your print
preview window (which prevents the user from going back to the MDI parent)
or use Form.Owner to set the owner of the child to the parent.

Hope this helps
Jay

"jon morgan" <jo********@ntlworld.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl... Thanks Jay,

I'm implementing various child windows (egPrintPreview) where the user would expect to see an approriate menu attached to the child and not the parent.
It just wasn't an issue in VB6 and much as I can see the power of menu merge I don't see why we shouldn't have the option to "turn it off".

Regards

Jon

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message news:ue**************@TK2MSFTNGP09.phx.gbl...
Jon,
I'm not sure if you can prevent the merge itself, however I would expect

you
can mask the effect of the merge by using MenuMerge.Remove or
MenuMerge.Replace for the MenuItem.MergeType. Of course you could simply

not
add a menu to the MDI child then the merge naturally will not occur.

Somehow
I do not think this is what you mean ;-)

Which raises two questions:
- Why do you want to prevent it?
- What you are expecting instead?

The reason I ask, there may be 'better' alternatives rather then

preventing
the merging.

Hope this helps
Jay

"jon morgan" <jo********@ntlworld.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,

In an MDI application how can I prevent the CLR automatically merging a child windows' menu with that of the parent MDI form ?

Thanks for any help

Jon



Nov 20 '05 #4

P: n/a
Thanks Jay,

You are quite correct of course - my Vb6 forms weren't MDI and Form.Owner
should do the trick. Thanks for setting me straight.

Regards

Jon

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:e$**************@TK2MSFTNGP09.phx.gbl...
Jon,
I'm implementing various child windows (egPrintPreview) where the user would
expect to see an approriate menu attached to the child and not the parent. Don't make the form a MDI child then.

The Windows Standard is to have a single menu in the MDI Parent. The
framework adheres to this standard. As far as I can tell VB6 also adheres to this standard. (when working with MDI Forms & MDI children).

In VB6 the only option I see is to replace the MDI parent menu. Where as
VB.NET allows you to merge the menu with the parent, which is significantly more flexible. The parent has common options, the child has child specific
options. In both cases this menu is displayed as part of the MDI parent.

Have you looked at either using Form.ShowDialog(owner) to show your print
preview window (which prevents the user from going back to the MDI parent)
or use Form.Owner to set the owner of the child to the parent.

Hope this helps
Jay

"jon morgan" <jo********@ntlworld.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
Thanks Jay,

I'm implementing various child windows (egPrintPreview) where the user would
expect to see an approriate menu attached to the child and not the parent. It just wasn't an issue in VB6 and much as I can see the power of menu

merge
I don't see why we shouldn't have the option to "turn it off".

Regards

Jon

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in

message
news:ue**************@TK2MSFTNGP09.phx.gbl...
Jon,
I'm not sure if you can prevent the merge itself, however I would
expect you
can mask the effect of the merge by using MenuMerge.Remove or
MenuMerge.Replace for the MenuItem.MergeType. Of course you could
simply not
add a menu to the MDI child then the merge naturally will not occur.

Somehow
I do not think this is what you mean ;-)

Which raises two questions:
- Why do you want to prevent it?
- What you are expecting instead?

The reason I ask, there may be 'better' alternatives rather then

preventing
the merging.

Hope this helps
Jay

"jon morgan" <jo********@ntlworld.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Hello,
>
> In an MDI application how can I prevent the CLR automatically

merging a > child windows' menu with that of the parent MDI form ?
>
> Thanks for any help
>
> Jon
>
>
>



Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.