Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > Visual Studio 2005
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 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 September 7th, 2007, 09:49 AM
Registered User
 
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default MDI & MDI Child Forms Menu's in VB2005

Hi,

I'm using VB2005

I have an Mdi form and he have a MenuStrip in the properties I define the
AllowMerge=False
In the SubMenus of the MenuStrip there is some ShortcutKeys

I have also Child Form name Form1 and also he have a MenuStrip in the properties I define the AllowMerge=False
In the SubMenus of the MenuStrip there is some shortcutKeys

In the Parent Form and also in the Child Form I have some same ShortcutKeys, example: Ctrl+Z

I wrote the next code in the Parent Form:
        For Each menuItem As ToolStripMenuItem In MenuStrip.Items
            menuItem.Enabled = False
        Next
'
        Dim f As New Form1
        f.MdiParent = Me
        f.Show()

When I'm loading the Child Form from the Parent Form and when I'm pressing Ctrl+Z I get the result of the action of the Parent Form

Why?

P.S.
How I can add to the next code that also SubItems in the MenuStrip Enabled = False

For Each menuItem As ToolStripMenuItem In MenuStrip.Items
    menuItem.Enabled = False
Next


Have a nice day
http://yulyos4vbnet.spaces.live.com





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
Controlling MDI child form from MDI parent panel LuxCoder Pro Visual Basic 2005 1 May 25th, 2007 12:20 PM
Controlling MDI child form from MDI parent panel LuxCoder VB.NET 2002/2003 Basics 7 April 11th, 2007 02:38 PM
Controlling MDI child form from MDI parent panel LuxCoder VB How-To 1 April 9th, 2007 03:25 PM
Opening MDI Child on Button Click of MDI Child Sachin Shinde Visual Studio 2005 0 June 8th, 2006 05:05 AM





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