Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2003, 04:21 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default Child Form Menus

Hi,

I'm using an MDI environment,and the mdi form has a menu item on it. I am trying to add a menu item to a child form, however when I open the form the menu items either get added to the MDi form menu, or they do not appear at all. Can anybody tell me what i'm doing wrong.

Cheers
 
Old October 29th, 2003, 03:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

I don't think you can have a separate set of Menu controls on a child form. I remember in VB6, whenever you had a child form with menu controls, it hid the MDI controls, so only one set of controls was visible.

What I did was create a menu item for the child form, set visible of that item to false, and set it to true when the form is loaded.

Hope this helps,

Brian
 
Old October 29th, 2003, 04:06 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian,

I'll bear that in mind. I opted for the toolbar approach. It looks OK.

Cheers

Byron

 
Old October 30th, 2003, 07:03 AM
Authorized User
 
Join Date: Jun 2003
Location: Edinburgh, , United Kingdom.
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

I have just recently started a MDI application and found some code for working with menu items. What you can have is your child form menu items merge or add to your MDI forms menu.

What to look at is the MergeType in the menu control. Set up 2 menu controls one on your MDI and one on your child form. For example creating a 'File' menu have the MDI and the child have a 'File' menu with different items. Set the MergeType to be Mergeitems on both controls and when you run the application both items will merge. Also you can add a menu item from the child to appear in the MDI menu. Do this by setting the child Mergetype to 'Add'.

This is just an example of what I have implemented and I hope this gives you an idea.

Nickie




Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying MDI Child Form Menus with MDI Parent ashu_from_india Pro VB 6 3 June 10th, 2008 11:01 PM
form submit problem/dependent list menus alexscan Pro PHP 0 January 1st, 2008 06:29 PM
Reload Parent form from Child form maulik33 ASP.NET 2.0 Basics 2 February 6th, 2007 12:53 PM
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.