How are user control menus merged into a container form menu

How are user control menus merged into a container form menu

Post by Q3JhaW » Fri, 21 Jan 2005 01:01:02


Hi
I am maintaining a VB6 SP5 application which adds a usercontrol to a form at
runtime.

Both the form and user control have a menu, for example 'Help'.

At runtime, the user control's menu is merged with the form menu but not as
I expected. The forms menu contains two menu items with the same name i.e.
Help Help.

Is it possible or should the merge behaviour consolidate both Help menus
into one Help menu item?

Perhaps there is some preparation required in both the form and user control
to ensure this happens. What should I do?

Regards
Craig

--
Regards,
Craig
 
 
 

How are user control menus merged into a container form menu

Post by v-phuan » Fri, 21 Jan 2005 17:15:13

Hi

Based on my research, this behavior is how VB works and is by design.
To workaround the problem I think we have to use a two duplicate menu on
both control and form, and hide one of them according to the suituation.
Also we can fill the menu dynamically as the link below do.

Runtime menus in VB6 allow for more flexibility
http://www.yqcomputer.com/

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

How are user control menus merged into a container form menu

Post by Q3JhaW » Fri, 21 Jan 2005 22:25:02

Peter
Thanks for the reply
This has given me some thoughts. The dynamic menu may be the best option for
me. I'm hoping that I won't need to change the user controls and will be able
to extend the help menu dynamically so only one Help menu item appears.

Craig
 
 
 

How are user control menus merged into a container form menu

Post by v-phuan » Sat, 22 Jan 2005 10:19:58

Hi

Thanks for your feedback.
It seems that this VB6 by design behavior, I think so far we need to use
dynamic menu to do your job.
If you still have any concern, please feel free to post here.

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.