Disable MDI menu items from child form?... Help me please

Zack2k6

New member
Joined
Mar 24, 2006
Messages
4
Programming Experience
3-5
i have 2 forms
in form1 i have set this mdiparent property to true.
i have menus items in mdi form and these sub
Public Sub disableMenu()
MenuItem2.Enabled = False
End Sub
Public Sub enableMenu()
MenuItem2.Enabled =
True
End Sub
in mdi load i called disableMenu(). so its working
but if i call enableMenu() from child form its not working...
Dim f As New Form1
f.disableMenu()
Me.Close()
eventhough i have set menu modifiers property to Public its not working
u please help me

Thanks
 
when dealing with mdi stuff put the menu items on the child form then call the sub on the child form and the menu item will be disabled on the mdi parent
 
thanks for your reply. sorry i couldn't understand. put the menu items means?. create menus in child form?. then how it will display menus in mdi form. can u please give me sample coding..

thank you very much
 
you make the child menus on the child form, vb takes care of showing the child menu on the parent menu (if the parent window also has a menu vb merges the two together)

i could make a quick example or something if needed
 
reply to ur problem

hi i am sumeet here....i was also facing same problem but some how with the help of my frend i managed to solved it......

code go like this

object_of_mdi.menuitems.menuitems.menuname=false
 
take a look at the attachment, the menu is on the child but the parent is calling the sub that's on the child form
 
Back
Top